Skip to content

feat: add configuration for nav - #964

Open
avivkeller wants to merge 1 commit into
mainfrom
config-nav
Open

feat: add configuration for nav#964
avivkeller wants to merge 1 commit into
mainfrom
config-nav

Conversation

@avivkeller

Copy link
Copy Markdown
Member

Adds web.navigation, which supplies the sidebar groups (navigation.sidebar) and the navigation bar items (navigation.navbar) from configuration. That way, consumers don't need to rewrite the component just to change the nav

Copilot AI review requested due to automatic review settings July 31, 2026 01:22
@avivkeller
avivkeller requested a review from a team as a code owner July 31, 2026 01:22
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive, backward-compatible web generator configuration with unchanged defaults when navigation is omitted; risk is limited to nav/link resolution behavior on sites that opt in.

Overview
Adds web.navigation so sites can define navigation.sidebar (grouped links with optional nesting) and navigation.navbar (top bar items) in doc-kit.config.mjs instead of overriding #theme/Sidebar / #theme/Navigation.

The built-in SideBar now builds groups from config when present (resolving internal paths per page, passing through http(s) links, supporting nested items); otherwise it keeps the single API Documentation group from pages. The version Select is only rendered when versions is non-empty. NavBar reads navigation.navbar (default empty) and passes pathname={metadata.path} for active highlighting.

navigation is typed against the UI SideBar / NavBar props, defaulted in the web generator, and exported from #theme/config. The doc-kit www site drops its custom sidebar component in favor of config (including a glob-built Generators group); beta adds absolute navbar links for the Node.js preview.

Reviewed by Cursor Bugbot for commit 9107b8b. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Jul 31, 2026 1:23am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 5.76923% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.79%. Comparing base (b80958f) to head (9107b8b).

Files with missing lines Patch % Lines
www/doc-kit.config.mjs 0.00% 30 Missing ⚠️
beta/doc-kit.config.mjs 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #964      +/-   ##
==========================================
+ Coverage   86.63%   86.79%   +0.16%     
==========================================
  Files         195      194       -1     
  Lines       17938    17907      -31     
  Branches     1632     1632              
==========================================
+ Hits        15540    15543       +3     
+ Misses       2392     2358      -34     
  Partials        6        6              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

api-links Generator

Performance estimate (single CI run)

  • Generation time: 20.6% faster (1.65 s → 1.31 s)
  • Peak memory: 2.9% lower (358.09 MB → 347.81 MB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 2.6% faster (20.13 s → 19.60 s)
  • Peak memory: 6.7% lower (2.42 GB → 2.26 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 2.1% faster (8.92 s → 8.73 s)
  • Peak memory: 4.1% lower (1.72 GB → 1.65 GB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 5.8% faster (8.38 s → 7.89 s)
  • Peak memory: 2.6% lower (1.80 GB → 1.75 GB)

orama-db Generator

Output size: 1 file changed · net +1.20 KB

File size details
File Main PR Change
orama-db.json 8.89 MB 8.89 MB +1.20 KB (+0.0%)

Performance estimate (single CI run)

  • Generation time: 3.4% faster (8.16 s → 7.88 s)
  • Peak memory: 4.8% lower (1.86 GB → 1.77 GB)

web Generator

Output size: 148 files changed · net +243.00 B

File size details
File Main PR Change
assets/all-CrZzA5_i.js 22.13 MB -22.13 MB (-100.0%)
assets/all-DCdewW9M.js 22.13 MB +22.13 MB
assets/fs-Blri9ayk.js 1.55 MB -1.55 MB (-100.0%)
assets/fs-D68ddyYa.js 1.55 MB +1.55 MB
assets/crypto-WYLjh0de.js 1.37 MB -1.37 MB (-100.0%)
assets/crypto-WTnMJHy_.js 1.37 MB +1.37 MB
assets/buffer-D5qmIrxw.js 1.14 MB -1.14 MB (-100.0%)
assets/buffer-DCSnjfKf.js 1.14 MB +1.14 MB
assets/test-BTWjZ2-6.js 1.01 MB -1.01 MB (-100.0%)
assets/test-DLjOKq_m.js 1.01 MB +1.01 MB
assets/stream-CGThnE_u.js 937.49 KB -937.49 KB (-100.0%)
assets/stream-CFXmZqRW.js 937.49 KB +937.49 KB
assets/http2-Bow2DM_h.js 876.92 KB -876.92 KB (-100.0%)
assets/http2-C-3hUt6n.js 876.92 KB +876.92 KB
assets/util-BMZo5w0c.js 796.67 KB -796.67 KB (-100.0%)
assets/util-DKvho3er.js 796.67 KB +796.67 KB
assets/http-BgTg2fgN.js 761.61 KB -761.61 KB (-100.0%)
assets/http-AewSTCB6.js 761.61 KB +761.61 KB
assets/process-B_1YIodw.js 734.62 KB -734.62 KB (-100.0%)
assets/process-AqWxXFez.js 734.62 KB +734.62 KB
assets/n-api-CVBxtN0K.js 711.18 KB -711.18 KB (-100.0%)
assets/n-api-CdeXT_XV.js 711.18 KB +711.18 KB
assets/events-C81-DF28.js 570.23 KB -570.23 KB (-100.0%)
assets/events-Ba4-o0R1.js 570.23 KB +570.23 KB
assets/quic-mG4CNgru.js 563.48 KB -563.48 KB (-100.0%)
assets/quic-8J9RM92I.js 563.48 KB +563.48 KB
assets/stream_iter-DH4WChL_.js 510.52 KB -510.52 KB (-100.0%)
assets/stream_iter-DSLl0g35.js 510.52 KB +510.52 KB
assets/child_process-DjQc6mK-.js 490.99 KB -490.99 KB (-100.0%)
assets/child_process-CMPFrpJG.js 490.99 KB +490.99 KB
assets/assert-CfY_8GcV.js 473.91 KB -473.91 KB (-100.0%)
assets/assert-CSrocoh3.js 473.91 KB +473.91 KB
assets/vm-YbrfYsub.js 466.32 KB -466.32 KB (-100.0%)
assets/vm-D0xHeA9K.js 466.32 KB +466.32 KB
assets/webcrypto-DRQLs2o8.js 430.98 KB -430.98 KB (-100.0%)
assets/webcrypto-Djf2V8PP.js 430.98 KB +430.98 KB
assets/worker_threads-8oDVg3Mg.js 421.19 KB -421.19 KB (-100.0%)
assets/worker_threads-BFfJST-V.js 421.19 KB +421.19 KB
assets/zlib-QUqdLm9J.js 405.35 KB -405.35 KB (-100.0%)
assets/zlib-DR0lwJ4A.js 405.35 KB +405.35 KB
assets/perf_hooks-CZoaMj9s.js 384.48 KB -384.48 KB (-100.0%)
assets/perf_hooks-CKD4vmuK.js 384.48 KB +384.48 KB
assets/net-CvRhnrY4.js 374.21 KB -374.21 KB (-100.0%)
assets/net-LH_HLNRs.js 374.21 KB +374.21 KB
assets/errors-D0WJ-qq9.js 373.22 KB -373.22 KB (-100.0%)
assets/errors-Dq0Y2ZAR.js 373.22 KB +373.22 KB
assets/v8-DI4a9Jl-.js 366.72 KB -366.72 KB (-100.0%)
assets/v8-g8eG537u.js 366.72 KB +366.72 KB
assets/module-xb9ReeLG.js 362.96 KB -362.96 KB (-100.0%)
assets/module-C8M1W5dr.js 362.96 KB +362.96 KB
assets/tls-X9eEzKSy.js 357.42 KB -357.42 KB (-100.0%)
assets/tls-DxXnY8Th.js 357.42 KB +357.42 KB
assets/url-D35eNwPc.js 351.90 KB -351.90 KB (-100.0%)
assets/url-BMPb8YF7.js 351.90 KB +351.90 KB
assets/diagnostics_channel-BSQa3sNk.js 337.49 KB -337.49 KB (-100.0%)
assets/diagnostics_channel-gFrjnbD5.js 337.49 KB +337.49 KB
assets/webstreams-CUg3mEJV.js 328.11 KB -328.11 KB (-100.0%)
assets/webstreams-DWOfeube.js 328.11 KB +328.11 KB
assets/cli-CyeCYbN-.js 317.81 KB -317.81 KB (-100.0%)
assets/cli-C0nkiUNF.js 317.81 KB +317.81 KB
assets/addons-B98oolzy.js 305.29 KB -305.29 KB (-100.0%)
assets/addons-mbkoRB3-.js 305.29 KB +305.29 KB
assets/sqlite-DXIv9JCt.js 290.43 KB -290.43 KB (-100.0%)
assets/sqlite-D8z3W5vm.js 290.43 KB +290.43 KB
assets/dns-BnIxxSmM.js 290.16 KB -290.16 KB (-100.0%)
assets/dns-Bd1bA43b.js 290.16 KB +290.16 KB
assets/deprecations-BSyTfntN.js 279.12 KB -279.12 KB (-100.0%)
assets/deprecations-D1wWRPDs.js 279.12 KB +279.12 KB
assets/readline-CbsLetho.js 232.99 KB -232.99 KB (-100.0%)
assets/readline-CpkrPaNh.js 232.99 KB +232.99 KB
assets/async_context-B46oXNeO.js 218.68 KB -218.68 KB (-100.0%)
assets/async_context-CX7O2RvZ.js 218.68 KB +218.68 KB
assets/repl-Dd-byHYA.js 207.09 KB -207.09 KB (-100.0%)
assets/repl-DLySsEIJ.js 207.09 KB +207.09 KB
assets/cluster-D1UbGOq1.js 198.37 KB -198.37 KB (-100.0%)
assets/cluster-euVUIa3E.js 198.37 KB +198.37 KB
assets/async_hooks-Dha3sVj7.js 195.28 KB -195.28 KB (-100.0%)
assets/async_hooks-C4Kj_U8Y.js 195.28 KB +195.28 KB
assets/dgram-B3ffaerB.js 193.02 KB -193.02 KB (-100.0%)
assets/dgram-JhBgUxt_.js 193.02 KB +193.02 KB
assets/ui-QUrVq_mh.js 189.76 KB +189.76 KB
assets/ui-BkH29jDC.js 189.53 KB -189.53 KB (-100.0%)
assets/report-BV-G8RK8.js 184.73 KB -184.73 KB (-100.0%)
assets/report-DIY2n9eI.js 184.73 KB +184.73 KB
assets/https-Ckc3py3M.js 161.35 KB -161.35 KB (-100.0%)
assets/https-BIlUg0yx.js 161.35 KB +161.35 KB
assets/modules-4MWAnXn9.js 151.88 KB -151.88 KB (-100.0%)
assets/modules-Kto4LHo1.js 151.88 KB +151.88 KB
assets/packages-Ckr2v6iE.js 147.40 KB -147.40 KB (-100.0%)
assets/packages-BeGNvJAr.js 147.40 KB +147.40 KB
assets/esm-ChLYer2f.js 135.58 KB -135.58 KB (-100.0%)
assets/esm-BaUeQJna.js 135.58 KB +135.58 KB
assets/globals-BsoUsDzF.js 130.04 KB -130.04 KB (-100.0%)
assets/globals-CvlyydR2.js 130.04 KB +130.04 KB
assets/inspector-B8viQHjz.js 124.68 KB -124.68 KB (-100.0%)
assets/inspector-C1xNPOlT.js 124.68 KB +124.68 KB
assets/ffi-4pDIXTxb.js 110.86 KB -110.86 KB (-100.0%)
assets/ffi-DRog87HX.js 110.86 KB +110.86 KB
assets/os-Bd3rZnKq.js 110.85 KB -110.85 KB (-100.0%)
assets/os-Ceng8MDg.js 110.85 KB +110.85 KB
assets/console-J4UPUtdT.js 106.25 KB -106.25 KB (-100.0%)
assets/console-ouuOqNyG.js 106.25 KB +106.25 KB
assets/timers-jo3ANtBj.js 101.31 KB -101.31 KB (-100.0%)
assets/timers-CIyXVDvT.js 101.31 KB +101.31 KB
assets/dtls-Cc57ZhY_.js 99.62 KB -99.62 KB (-100.0%)
assets/dtls-CVWRl5Lh.js 99.62 KB +99.62 KB
assets/path-BGweKA3E.js 99.24 KB -99.24 KB (-100.0%)
assets/path-EQRnIle8.js 99.24 KB +99.24 KB
assets/debugger-soDEzaUE.js 94.31 KB -94.31 KB (-100.0%)
assets/debugger-CAETtoUV.js 94.31 KB +94.31 KB
assets/domain-BqbN7sJ-.js 87.42 KB -87.42 KB (-100.0%)
assets/domain-K1SPVmh2.js 87.42 KB +87.42 KB
assets/single-executable-applications-dl1hT5UK.js 82.54 KB -82.54 KB (-100.0%)
assets/single-executable-applications-CB0IYKSW.js 82.54 KB +82.54 KB
assets/tracing-oWqG0W15.js 73.90 KB -73.90 KB (-100.0%)
assets/tracing-DFHwWcoe.js 73.90 KB +73.90 KB
assets/tty-BpheBQjj.js 48.25 KB -48.25 KB (-100.0%)
assets/tty-Bk8Kafz_.js 48.25 KB +48.25 KB
assets/vfs-DdiQkr7_.js 46.04 KB -46.04 KB (-100.0%)
assets/vfs-B1jV2Glq.js 46.04 KB +46.04 KB
assets/permissions-1llqT20y.js 44.08 KB -44.08 KB (-100.0%)
assets/permissions-CZRugtEm.js 44.08 KB +44.08 KB
assets/wasi-CTcaUtw0.js 40.83 KB -40.83 KB (-100.0%)
assets/wasi-CHBX-51H.js 40.83 KB +40.83 KB
assets/embedding--8h_h4Ni.js 33.42 KB -33.42 KB (-100.0%)
assets/embedding-BibNwaQu.js 33.42 KB +33.42 KB
assets/intl-DShBT25Z.js 32.44 KB -32.44 KB (-100.0%)
assets/intl-DF-tJjmV.js 32.44 KB +32.44 KB
assets/querystring-cnbjdAWR.js 29.92 KB -29.92 KB (-100.0%)
assets/querystring-C88pf9D3.js 29.92 KB +29.92 KB
assets/string_decoder-T_Pm78q3.js 28.32 KB -28.32 KB (-100.0%)
assets/string_decoder-_Yle24Nl.js 28.32 KB +28.32 KB
assets/punycode-H67LUK7N.js 24.66 KB -24.66 KB (-100.0%)
assets/punycode-zaMiroCA.js 24.66 KB +24.66 KB
assets/typescript-ChUJbInI.js 21.60 KB -21.60 KB (-100.0%)
assets/typescript-CDh75h04.js 21.60 KB +21.60 KB
assets/index-BGUcdGHD.js 13.83 KB -13.83 KB (-100.0%)
assets/index-BB904t9W.js 13.83 KB +13.83 KB
assets/environment_variables-CfA6QWTW.js 11.73 KB -11.73 KB (-100.0%)
assets/environment_variables-DORIiU2X.js 11.73 KB +11.73 KB
assets/synopsis-ChE8I_NT.js 11.42 KB -11.42 KB (-100.0%)
assets/synopsis-BnPlQRUl.js 11.42 KB +11.42 KB
assets/documentation-DnC-IxdI.js 4.84 KB -4.84 KB (-100.0%)
assets/documentation-DO28ZshT.js 4.84 KB +4.84 KB
assets/CodeBox-4dNRYUCD.js 3.02 KB -3.02 KB (-100.0%)
assets/CodeBox-C15kKXPc.js 3.02 KB +3.02 KB
assets/404-PFrVc7Af.js 627.00 B -627.00 B (-100.0%)
assets/404-Bb9Y1CW-.js 627.00 B +627.00 B

Performance estimate (single CI run)

  • Generation time: 25.7% slower (59.78 s → 75.17 s)
  • Peak memory: 1.4% higher (5.25 GB → 5.32 GB)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9107b8b. Configure here.

Comment thread packages/core/src/generators/web/types.d.ts
@bmuenzenmeyer

Copy link
Copy Markdown
Contributor

I looked for this feature when making the getting-started section of the docs - awesome!

@bmuenzenmeyer bmuenzenmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was contemplating if we should alter the getting started experience to show this, but it's probably fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants