Documentation for Stirling PDF, hosted at docs.stirlingpdf.com.
The site is generated by a small custom static site generator (scripts/build.mjs) - no framework. It renders the markdown in /docs into static HTML.
- Node.js 20 or above
- npm
- Install dependencies:
npm install- Build the site and start the preview server:
npm run build
npm startThe site will be available at http://localhost:3000. Re-run npm run build after editing to see changes.
All content lives in /docs as extended markdown. Supported syntax:
- Frontmatter:
title,id,slug,sidebar_position,sidebar_label,description - Folders become sidebar categories;
_category_.jsonsets the label and order; a file named like its folder is the category index page - Admonitions:
:::note,:::tip,:::info,:::warning,:::caution,:::danger(with optional[Title]) - Tabs:
<Tabs groupId="...">/<TabItem value="..." label="...">(selection syncs across groups and persists) - Code fences with syntax highlighting (Shiki, light + dark) and copy buttons
URLs match the scheme the site has always used, so existing links and the Algolia index keep working.
scripts/build.mjs- build entry: walks/docs, resolves links, writes./buildscripts/lib/content.mjs- content walker, nav tree, URL computationscripts/lib/markdown.mjs- markdown rendering (admonitions, tabs, Shiki)scripts/lib/template.mjs- page shell (navbar, sidebar, ToC, footer, integrations)site/assets/styles.css- all styling (design tokens mirrored from the Stirling portal)site/assets/main.js- theme toggle, tabs, drawer, copy buttons, scroll-spy
Contributions are welcome! To add or update documentation:
- Create or edit markdown files in the
docs/directory - Preview changes locally (
npm run buildthennpm start) - Submit a pull request
Pushes to main build and deploy to GitHub Pages via .github/workflows/deploy.yml (npm run build outputs ./build).