folder2website

On this page

Build a static site from a repo or markdown folder.

Run

bunx github:spashii/folder2website#main owner/repo
bunx github:spashii/folder2website#main . --serve
bunx github:spashii/folder2website#main . --serve --port 4322
bunx github:spashii/folder2website#main . --base-url https://example.com
bunx github:spashii/folder2website#main . --manifest docs/site.webmanifest
bunx github:spashii/folder2website#main . --hide-generator-attribution
bunx github:spashii/folder2website#main . --hide-footer-actions

Private repo:

GITHUB_TOKEN=github_pat_... bunx github:spashii/folder2website#main owner/repo

Options

Output

Check

Every build prints what it found in the source; --check does only that, writes nothing, and exits 1 when there are errors. Links are judged from the rendered pages, and each finding names the markdown file, line and column.

bunx github:spashii/folder2website#main . --check
bunx github:spashii/folder2website#main . --check --json
README.md:6:10  error  f2w/broken-link
  "giude.md" does not exist
  fix: did you mean "guide.md"?

Errors: broken-link, broken-anchor (only H2 and H3 headings get anchors), missing-asset, plantuml-failed, sidebar-entry. Warnings: outside-folder, unlinked-file (a markdown file no page links to; folders starting with _ or . are skipped), single-h1, heading-hierarchy, code-block-lang.

The JSON is { version, summary, diagnostics }, plus review with --review, so an agent can fix the findings and run it again.

Review

For drafts an agent writes and a person reads. Off by default; --review turns it on. reviewed.json, beside the home page, records each reviewed page with a fingerprint of its text. A page with no entry, or whose text changed since, reads as awaiting review:

Whitespace changes do not count. Nothing depends on git, so a plain folder works.

bunx github:spashii/folder2website#main . --review
bunx github:spashii/folder2website#main . --review --mark-reviewed access.md
bunx github:spashii/folder2website#main . --mark-reviewed all --reviewer Sameer

Rendering

d3-force and MiniSearch are vendored under vendor/ (see vendor/README.md) and copied into the output, so a built site needs no third-party scripts at runtime.

Deploy

GitHub Pages recipe: docs/deploy-with-github-pages.md.

Manifest mapping: docs/manifest.md.

Related pages