Skip to content

feat(docs): add documentation for doc-kit#889

Merged
bmuenzenmeyer merged 22 commits into
mainfrom
doc-kit-docs
Jul 19, 2026
Merged

feat(docs): add documentation for doc-kit#889
bmuenzenmeyer merged 22 commits into
mainfrom
doc-kit-docs

Conversation

@bmuenzenmeyer

@bmuenzenmeyer bmuenzenmeyer commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Introduces the doc-kit documentation site, built with doc-kit!
This also serves as a reasonable simple web example.

Validation

npm run docs:build
npx serve www/out
image

Getting started suggestion end-state

image

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@vercel

vercel Bot commented Jul 10, 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 18, 2026 7:14pm

Request Review

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.32787% with 243 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.06%. Comparing base (d7bdf39) to head (358158f).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
www/theme/SideBar.jsx 0.00% 103 Missing ⚠️
www/doc-kit.config.mjs 0.00% 75 Missing ⚠️
scripts/build-docs-content.mjs 0.00% 65 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #889      +/-   ##
==========================================
+ Coverage   85.04%   85.06%   +0.02%     
==========================================
  Files         179      192      +13     
  Lines       16496    17450     +954     
  Branches     1500     1550      +50     
==========================================
+ Hits        14029    14844     +815     
- Misses       2457     2600     +143     
+ Partials       10        6       -4     

☔ 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

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

web Generator

File Base Head Diff
all.html 19.94 MB 19.94 MB -234.00 B (-0.00%)

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Noice !

also we should add a "why doc-kit" section but with a "TBD" and in future have comparison with fuma-docs/docausorus ...

Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/doc-kit.config.mjs
Comment thread .github/workflows/docs.yml Outdated
Comment thread .github/workflows/docs.yml
@bmuenzenmeyer
bmuenzenmeyer marked this pull request as ready for review July 12, 2026 02:20
@bmuenzenmeyer
bmuenzenmeyer requested a review from a team as a code owner July 12, 2026 02:20
@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly docs-site and CI additions; the relative() change is localized, tested, and only affects internal link resolution for nested paths.

Overview
Adds a self-hosted doc-kit documentation site under www/: narrative pages, a content-assembly script that merges www/pages, docs/, and generator READMEs into gitignored www/content/, www/doc-kit.config.mjs for web + orama-db, a custom sidebar theme, and npm run docs:build plus a GitHub Actions workflow that builds and uploads www/out.

Fixes relative() in src/utils/url.mjs so the target path’s last segment is not stripped during common-prefix matching—e.g. linking to /generators from /generators/web now yields ../generators instead of ., with new unit tests. This matters for nested doc trees (including the new site’s generators/* pages).

Smaller follow-ons: publish files whitelist in package.json, Prettier prose wrap for www/pages, configuration doc example with target, and generator README heading demotion (###) for consistent site rendering.

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

Comment thread scripts/vercel-docs-build.sh Outdated
Comment thread www/doc-kit.config.mjs
@avivkeller avivkeller changed the title Doc kit docs feat(docs): add documentation for doc-kit Jul 12, 2026
Comment thread www/pages/getting-started.md
Comment thread scripts/build-docs-content.mjs
Comment thread scripts/vercel-docs-build.sh Outdated
Comment thread www/pages/getting-started.md
Comment thread www/pages/getting-started.md Outdated
Comment thread www/pages/getting-started.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/doc-kit.config.mjs
Comment thread scripts/build-docs-content.mjs
Co-authored-by: Aviv Keller <[email protected]>

@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.

There are 4 total unresolved issues (including 3 from previous reviews).

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 3f035e7. Configure here.

Comment thread scripts/build-docs-content.mjs
Comment thread src/generators/orama-db/README.md
Comment thread package.json
Comment thread www/pages/getting-started.md
CHANGELOG, LICENSE, README are usually defaults, but i want to be affirmative here
bmuenzenmeyer and others added 2 commits July 18, 2026 14:11
relative() consumed the target's final path segment as a common directory
whenever the target was a path prefix of the current page, so
relative('/generators', '/generators/web') returned '.' instead of
'../generators' — which callers appending '.html' turned into a broken
'..html' link. Treat the last segment of `to` as the target itself so it
always survives into the result.

Unreachable in flat page layouts (every existing call site passes
top-level paths, where the stripping loop never runs), so output is
unchanged for those; surfaced by sites feeding nested input directories
to the web generator.

Co-Authored-By: Claude Fable 5 <[email protected]>
@bmuenzenmeyer

Copy link
Copy Markdown
Contributor Author

I spent a lot of time sort of incredulous that Claude suggested there was a nascent bug in doc-kit that our beta, or learn, or webpack had yet to find. So perhaps @avivkeller another pass at d3f2819

@avivkeller

Copy link
Copy Markdown
Member

I think what Claude is getting at is that if I navigate from parent/child to parent/, our relative() helper will generate .. instead of ../parent.

That said, this isn't really a doc-kit issue, rather, it's a consequence of how browsers resolve relative URLs. Redirecting from a URL with a trailing slash behaves differently than redirecting from one without. Claude's change fixes the parent/child -> parent case, but it breaks parent/child/ -> parent, which was previously supported (I think, I'm eyeballing this). As far as I can tell, it's an either-or tradeoff: we either assume trailing slashes or we don't.

In practice, this only becomes an issue if all of the following are true:

  1. You're using nested directories with doc-kit.
  2. You've configured doc-kit to use relative links instead of absolute links.

We intentionally don't enable relative links on our Learn sites, webpack sites, or our main docs site because they can produce obscure, and often incorrect, URLs for exactly this reason.

@bmuenzenmeyer

bmuenzenmeyer commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

i purposely made it atomic so it could be reverted, if we so choose.
edit: actually this is a dumb statement, supposedly doc-kit docs links wont render correctly without it. need to try

@avivkeller

Copy link
Copy Markdown
Member

@bmuenzenmeyer merge when ready

@bmuenzenmeyer
bmuenzenmeyer merged commit 68751af into main Jul 19, 2026
26 checks passed
@bmuenzenmeyer
bmuenzenmeyer deleted the doc-kit-docs branch July 19, 2026 02:12
@github-actions github-actions Bot mentioned this pull request Jul 19, 2026
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