feat: add governance docs fetcher under pages/contribute/governance#127
Open
ryzrr wants to merge 2 commits into
Open
feat: add governance docs fetcher under pages/contribute/governance#127ryzrr wants to merge 2 commits into
ryzrr wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an automated markdown fetch step to pull webpack/governance documents into this site under /contribute/governance, and wires the generated sidebar into the global site sidebar.
Changes:
- Added
scripts/markdown/governance.mjsto fetch specific governance markdown files, rewrite cross-links, and generate asite.jsonsidebar for the section. - Updated
pages/site.mjsto include the governance sidebar. - Updated
package.jsonto run the new governance fetcher as part ofbuild:md, and updated.gitignoreto ignore the generated governance pages directory.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/markdown/governance.mjs | New fetcher script for governance markdown, link rewriting, and sidebar generation. |
| pages/site.mjs | Includes the generated governance sidebar into the overall sidebar export. |
| package.json | Adds build:md:governance and includes it in build:md. |
| .gitignore | Ignores generated pages/contribute/governance output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+8
| const { GH_TOKEN } = process.env; | ||
|
|
||
| const BASE_HEADERS = { | ||
| ...(GH_TOKEN && { Authorization: `Bearer ${GH_TOKEN}` }), | ||
| }; |
Comment on lines
+10
to
+12
| // Maps source filenames in webpack/governance repo to their output slug and sidebar label. | ||
| // Insertion order determines sidebar order, this could be changed as per need. | ||
| const FILE_MAP = { |
Comment on lines
2
to
5
| import loaders from './loaders/site.json' with { type: 'json' }; | ||
| import plugins from './plugins/site.json' with { type: 'json' }; | ||
| import contribute from './contribute/governance/site.json' with { type: 'json' }; | ||
|
|
avivkeller
reviewed
Jun 9, 2026
Comment on lines
+27
to
+33
| // Derived from FILE_MAP - stays in sync automatically if entries are added/removed. | ||
| const LINK_REWRITE_MAP = Object.fromEntries( | ||
| Object.entries(FILE_MAP).map(([source, { output }]) => [ | ||
| source, | ||
| `/contribute/governance/${output}`, | ||
| ]) | ||
| ); |
Co-authored-by: Aviv Keller <me@aviv.sh>
2898cb3 to
f416af4
Compare
avivkeller
reviewed
Jun 10, 2026
| /pages/loaders | ||
| /pages/plugins | ||
| /generated | ||
| /pages/contribute/governance |
Member
There was a problem hiding this comment.
Suggested change
| /pages/contribute/governance | |
| /pages/about/governance |
What do we think about this subdirectory?
| groupName: 'Loaders & Plugins', | ||
| items: [...loaders.sidebar, ...plugins.sidebar], | ||
| }, | ||
| ...contribute.sidebar, |
Member
There was a problem hiding this comment.
maybe put this under a groupName of About
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.
Summary
Adds a script
scripts/markdown/governance.mjsthat fetches the webpack governance repository's markdown files.What kind of change does this PR introduce?
Automated governance docs fetching.
Did you add tests for your changes?
No
Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your changes are merged or what have you already documented?
None
Use of AI
For Regex logic and lookaheads