Skip to content

Getting started

Install

Terminal window
npm install @staticbolt/core @staticbolt/docs @staticview/ui

@staticview/ui provides sv-accordion, used by the sidebar, the mobile table of contents, and collapsible callouts.

Project layout

docs/
.staticbolt.ts
tsconfig.json
pages/ markdown content, becomes the site
sources/
layouts/document.layout.html
styles/docs.css
styles/theme.css
parts/social-icons/
assets/favicon.svg

tsconfig.json declares the aliases the layout and config use:

{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./pages/*"],
"@/*": ["./*"],
"@assets/*": ["./sources/assets/*"],
"@styles/*": ["./sources/styles/*"],
"@layouts/*": ["./sources/layouts/*"],
"@parts/*": ["./sources/parts/*"]
}
}
}

Steps

  1. Copy the config from Configuration into .staticbolt.ts.
  2. Copy the layout from Layout into sources/layouts/document.layout.html.
  3. Create the two stylesheets from Styles.
  4. Add sources/parts/social-icons/social-icons.part.html with your links, or remove the two slot="icons" parts from the layout.
  5. Put a favicon.svg in sources/assets.
  6. Write pages/index.md.
Terminal window
npx staticbolt serve
npx staticbolt build

The dev server runs on port 3000 and rebuilds on change.