Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Updates the Learn site’s doc-kit setup to the latest version and shifts navigation/canonical behavior to be driven by a shared template and virtual JSON imports, aligning Learn with nodejs.org site navigation data.
Changes:
- Bump
@node-core/doc-kitto1.3.2and configuretemplatePath+ canonical link rendering. - Introduce build-time
virtualImportsfor#site/navigation.json(from nodejs.org) and#learn/navigation.json(derived from localnavigation.json+ page titles). - Refactor Sidebar/Nav/Footer components to consume the virtual navigation JSON instead of hardcoded/static local data.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/index.mjs | Adds helpers to derive sidebar groupings + i18n population used by virtual imports. |
| template.html | New HTML template including canonical link and updated head tags. |
| package.json | Bumps doc-kit devDependency to 1.3.2. |
| package-lock.json | Lockfile update for doc-kit 1.3.2. |
| navigation.json | Adds local Learn sidebar grouping source (paths per category). |
| doc-kit.config.mjs | Configures template and adds virtualImports for site + learn navigation. |
| components/Sidebar/index.jsx | Switches sidebar groups to #learn/navigation.json virtual import. |
| components/Navigation/index.jsx | Switches top nav items to #site/navigation.json virtual import. |
| components/Footer/index.jsx | Switches footer links/social links to #site/navigation.json virtual import. |
| components/Footer/footer.json | Removes now-redundant local footer navigation JSON. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MattIPv4
left a comment
There was a problem hiding this comment.
👀 https://nodejs-learn-git-doc-kit-improvements-openjs.vercel.app/learn/ has a canonical of <link rel="canonical" href="https://nodejs.org/learn/index">, that isn't right.
|
Okay, I need to fix In the meantime, fixed Vercel config for more relative URL issues |
|
See: nodejs/doc-kit#751 |
c62b2f2 to
ea189d9
Compare
9764129 to
e01aca4
Compare
Updates doc-kit to the latest version, adding support for:
<link rel="canonical" href="https://nodejs.org/learn{path}" />) (cc @MattIPv4)