Repository navigation
Move site-wide SEO keywords into Docusaurus config - #541
Merged
Merged
Conversation
97 docs carried the same 24-line keywords block, now replaced by the site-wide default in docusaurus.config.ts. The three docs with their own lists keep only their page-specific terms (docs/README.md had none).
✅ Deploy Preview for vc-community-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
A markdown.parseFrontMatter hook prepends the site keywords to any doc's own keywords, so pages with page-specific terms keep the site terms too.
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.

Linked Issue
None.
Description
docusaurus.config.ts: declares 11 site-wide keywords that describe the whole site.themeConfig.metadataemits them on pages withoutkeywordsfront matter.markdown.parseFrontMatterhook adds them in front of any doc's ownkeywords(duplicates removed), so page terms are added to the site list instead of replacing it.keywords:block that had been copied into 97 docs' front matter (2,437 lines deleted).community-roles/maintainers.mdkeepsvirtual coffee maintainers.lightning-talks/2023/speaker-info.mdkeeps its lightning-talk phrases.docs/README.mdhad no unique terms, so its list is gone.CONTRIBUTING.md: adds one line explaining where site keywords live.Checked in the build output: all 113 generated pages have exactly one
<meta name="keywords">tag, and the two pages with their own terms show the site terms followed by theirs.pnpm check,lint:md,typecheckandbuildall pass.Methodology
Every new page was copying the old block, and it labelled unrelated pages with section terms. For example, the Pairing challenge page claimed "coffee table groups" and "lightning talk". With one site-wide list, the site keywords are edited in one place. A page lists keywords only when it has terms of its own, and the build adds the site terms to them, so adding a page-specific term never drops the site list.
Code of Conduct