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.
- Check links before opening a pull request:
npm run checkThis renders every page without touching ./build and fails on broken internal links or missing #anchors.
The docs are split into product spaces so readers only see what applies to them. Each space is a top-level folder with its own sidebar, picked with the switcher at the top of the sidebar:
| Folder | Space | Audience |
|---|---|---|
docs/Cloud |
Stirling Cloud | People using stirling.com/app |
docs/Desktop |
Desktop app | Windows, macOS and Linux app users |
docs/Server |
Self-hosted server | Admins running their own server |
docs/Tools |
User guide | How to use the tools, in every product |
docs/Processor |
Processor | Processor pipelines and policies |
docs/Developers |
Developers | API, MCP and contributing |
Keep server settings (settings.yml, environment variables, Docker) in docs/Server. Other spaces link to it instead of repeating it.
A space is declared in its folder's _category_.json with space, short, icon, group and description. docs/Getting Started.md is the home page (layout: home).
When you move or rename a page, add its old URL to redirects.json so existing links keep working.
All content lives in /docs as extended markdown. Supported syntax:
- Frontmatter:
title,sidebar_position,sidebar_label,description(plusslug/idto override the URL) unlisted: truekeeps a page accessible by URL but excludes it from sidebar navigation, previous/next links and the sitemap, and addsnoindexfor search engines.- 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) - Pills:
<Badge>Login required</Badge>after a heading, in a table cell or in a list item. Headings keep their anchor. - Cards:
<Cards cols="2|3">/<Card title="..." icon="..." href="./page.md">text</Card>(icons inscripts/lib/icons.mjs) - Code fences with syntax highlighting (Shiki, light + dark) and copy buttons
scripts/build.mjs- build entry: walks/docs, resolves links, writes./buildscripts/lib/content.mjs- content walker, nav tree, product spaces, URL computationscripts/lib/markdown.mjs- markdown rendering (admonitions, tabs, cards, Shiki)scripts/lib/icons.mjs- icons for the product switcher and cardsscripts/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) - Run
npm run check - Submit a pull request
Pushes to main build and deploy to GitHub Pages via .github/workflows/deploy.yml (npm run build outputs ./build).