seo: URL-driven list filters and per-page meta descriptions#64
Open
FenjuFu wants to merge 2 commits into
Open
Conversation
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>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dongjiang1989
left a comment
Contributor
There was a problem hiding this comment.
Thanks @FenjuFu
Great feature.
Need add Changelog to CHANGELOG.md
Contributor
Author
|
@dongjiang1989 Thanks for the review. Added the SEO and URL-driven filtering changes to the |
Contributor
|
Please fix CI fail. DCO setting |
dongjiang1989
requested changes
Jul 24, 2026
dongjiang1989
left a comment
Contributor
There was a problem hiding this comment.
Need to check all added English and Chinese descriptions
| frontmatter={{ | ||
| title: '贡献者许可协议', | ||
| titleEn: 'Contributor License Agreement', | ||
| description: |
Contributor
Author
|
Thanks @dongjiang1989! Added the changelog entry under |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.