feat(docs): add documentation for doc-kit#889
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #889 +/- ##
==========================================
- Coverage 85.04% 84.89% -0.16%
==========================================
Files 179 191 +12
Lines 16496 17406 +910
Branches 1500 1540 +40
==========================================
+ Hits 14029 14776 +747
- Misses 2457 2623 +166
+ Partials 10 7 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| File | Base | Head | Diff |
|---|---|---|---|
all.html |
19.94 MB | 19.94 MB | -234.00 B (-0.00%) |
AugustinMauroy
left a comment
There was a problem hiding this comment.
Noice !
also we should add a "why doc-kit" section but with a "TBD" and in future have comparison with fuma-docs/docausorus ...
| - name: Upload site artifact | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: docs-site | ||
| path: www/out |
There was a problem hiding this comment.
what if we deploy the docs on GH page ?
There was a problem hiding this comment.
i dont have strong opinions here other that continuing our current patterns.
PR SummaryLow Risk Overview Build pipeline: Site config & UX: Supporting tweaks: Generator README headings are normalized for the site; Reviewed by Cursor Bugbot for commit fdc99ec. Bugbot is set up for automated code reviews on this repo. Configure here. |
| * | ||
| * @returns {Promise<Array<{ name: string, markdown: string }>>} | ||
| */ | ||
| const collectPages = async () => { |
There was a problem hiding this comment.
Would it be better to use a glob for this?
**/*.md?
There was a problem hiding this comment.
i dont have strong opinions either way, but knew that i
- wanted to clean
out - load very specific subset of three possible patterns, but perhaps not other future markdown.
There was a problem hiding this comment.
What about something like?
import { glob, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
import { basename, dirname, join } from 'node:path';
const ROOT = join(import.meta.dirname, '..');
const CONTENT = join(ROOT, 'www', 'content');
const SOURCES = [
{ pattern: 'www/pages/*.md', rename: basename },
{ pattern: 'docs/*.md', rename: basename },
{
pattern: 'src/generators/*/README.md',
rename: (file) => `generators/${basename(dirname(file))}.md`,
},
];
/**
* Collects the `{ name, markdown }` pages to write into `www/content/`.
*
* @returns {Promise<Array<{ name: string, markdown: string }>>}
*/
const collectPages = async () => {
const groups = await Promise.all(
SOURCES.map(async ({ pattern, rename }) => {
const files = await Array.fromAsync(glob(pattern, { cwd: ROOT }));
return Promise.all(
files.sort().map(async (file) => ({
name: rename(file),
markdown: await readFile(join(ROOT, file), 'utf-8'),
}))
);
})
);
return groups.flat();
};
const pages = await collectPages();
await rm(CONTENT, { recursive: true, force: true });
await mkdir(CONTENT, { recursive: true });
await Promise.all(
pages.map(({ name, markdown }) => writeFile(join(CONTENT, name), markdown))
);
console.log(`Wrote ${pages.length} pages to www/content/`);(Note I also moved generator- to generator/ in this example)
| The `legacy-html-all` target has no additional dependencies and is the quickest | ||
| way to see output: |
There was a problem hiding this comment.
What does "no additional dependencies" mean? It depends on other generators (e.g. AST)
There was a problem hiding this comment.
to run in the browser. it's html
| // Pages are assembled into `www/content/` at build time, so there is no | ||
| // single source file a `{path}` template could point at. Link to the repo | ||
| // instead; a per-page link would need a `#theme/Metabar` override that maps | ||
| // each slug back to its true origin. | ||
| editURL: `https://github.com/${REPOSITORY}`, |
There was a problem hiding this comment.
We can also leave this blank to remove the link entirely
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
There was a problem hiding this comment.
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).
❌ 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.
There was a problem hiding this comment.
missing link to orama docs
There was a problem hiding this comment.
a good follow up
Co-authored-by: Aviv Keller <me@aviv.sh>
CHANGELOG, LICENSE, README are usually defaults, but i want to be affirmative here

Description
Introduces the doc-kit documentation site, built with doc-kit!
This also serves as a reasonable simple
webexample.Validation
Getting started suggestion end-state
Related Issues
Check List
node --run testand all tests passed.node --run format&node --run lint.