seo: URL-driven list filters and per-page meta descriptions - #64
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dongjiang1989
left a comment
There was a problem hiding this comment.
Thanks @FenjuFu
Great feature.
Need add Changelog to CHANGELOG.md
|
@dongjiang1989 Thanks for the review. Added the SEO and URL-driven filtering changes to the |
|
Please fix CI fail. DCO setting |
dongjiang1989
left a comment
There was a problem hiding this comment.
Need to check all added English and Chinese descriptions
| frontmatter={{ | ||
| title: '贡献者许可协议', | ||
| titleEn: 'Contributor License Agreement', | ||
| description: |
|
Thanks @dongjiang1989! Added the changelog entry under |
|
@FenjuFu Need fix DCO sign |
8570bb1 to
05dc87e
Compare
|
@FenjuFu need rebase and fix review commit |
Make filtered views of the projects and events pages crawlable and shareable by moving filter state into URL query parameters: - /projects: category/language filters are now server-rendered links (?category=...&language=...) filtered on the server, replacing the client-side JS show/hide script; add an empty-state with a clear link - /events: switch to server rendering with ?type=... filter links, replacing the client-side filter script; event status (upcoming/ ongoing/past) is now computed at request time instead of being frozen at build time Canonical URLs already strip query strings, so filtered views canonicalize to the base list page and add no duplicate content. Also add unique meta descriptions to pages that previously fell back to the site-wide default: projects, events, adopters, landscape, contribute, CLA, values, security and the blog list/category/tag pages (MarkdownLayout now passes description through). Signed-off-by: FenjuFu <fufenjupku@gmail.com>
Signed-off-by: FenjuFu <fufenjupku@gmail.com>
05dc87e to
9cf373b
Compare
|
@dongjiang1989 Done — rebased onto latest |
Motivation
The projects and events list pages rendered their full dataset once and then filtered it in the browser with an inline
display: nonescript. That works for a human clicking around, but it costs us on SEO:agent-skillsprojects,hackathonevents) had no URL — it could not be linked, shared, or indexed.<meta name="description">of their own and fell back to the site-wide default, so search results showed the same generic snippet for/projects,/events,/adopters,/landscape,/contribute, the policy pages and the blog list pages./eventswas prerendered at build time, which froze each event'supcoming/ongoing/pastbadge to whatever the date was when the site was built.What changed
URL-driven list filters
/projects— category and language filters are now server-rendered links that carry state in the query string (/projects?category=agent-skills&language=TypeScript). Filtering happens on the server; the client-side filter script is gone. Unknown parameter values fall back toall, and an empty result set renders an explicit empty state with a "clear filters" link instead of a blank grid./events— same treatment with?type=meetup/?type=hackathonetc., and the page switches toprerender = falseso each event's status badge is computed at request time rather than at build time.Canonical URLs already strip the query string (
getCanonicalusesAstro.url.pathname), so filtered views canonicalize back to the base list page and introduce no duplicate content — they are crawlable and shareable without competing with the canonical page in the index.Per-page meta descriptions
Added distinct, bilingual descriptions to every page that previously inherited the site-wide default:
/projects,/events,/adopters,/landscape,/contribute/cla,/values,/security/blog,/category/<slug>,/tag/<slug>MarkdownLayoutnow forwards adescriptionfrom its frontmatter into the page metadata, which is what makes the three policy pages possible.Verification
astro check— 103 files, 0 errors / 0 warnings / 0 hintseslintandprettierclean on the touched files/projects?category=agent-skills&language=TypeScriptserver-renders exactly the intersection (1 card), both chips show active, and no filter script remains in the HTML/events?type=hackathonrenders only hackathons with the right chip active<meta name="description">is page-specific on/projects,/eventsand/security<link rel="canonical">on a filtered/projectsURL still points athttps://opensource.iflytek.com/projectsNotes
No visual redesign — the filter chips keep their existing styling and active/inactive states; they are
<a>elements instead of<button>elements. Filtering now costs a navigation instead of an instant DOM toggle, which is the intended trade for having real URLs.