Parts
Parts are HTML fragments under @staticbolt/docs/parts/<name>/<name>.part.html, placed with <part src="...">. Each has a matching .style.css, all of them are imported by the theme’s docs.css.
| Part | Inputs |
|---|---|
header | title attribute. Slot icons. |
sidebar | Slot icons. The tree comes from markdownPlugin. |
table-of-content | -desktop takes minHeading and maxHeading. |
pagination-links | None. Reads the sidebar links on the page. |
pagefind | None. Already inside header. |
color-scheme-switch | None. Already inside header and sidebar. |
badge | text, variant, title. |
callouts | None. Build-time script, see Content. |
mermaid | None. Loads mermaid on pages with a diagram. |
header
<part src="@staticbolt/docs/parts/header/header.part.html" title="My Project"> <part slot="icons" src="@parts/social-icons/social-icons.part.html"></part></part>Holds the menu button for the sidebar on small screens, the title linking to the site root, the search trigger, the icons slot, and the color scheme switch.
sidebar
<part src="@staticbolt/docs/parts/sidebar/sidebar.part.html"> <part slot="icons" src="@parts/social-icons/social-icons.part.html"></part></part>Marks the current page, opens the folders leading to it, and remembers open folders and scroll position across page loads. The footer repeats the icons and the color scheme switch for small screens, where the header hides them.
table-of-content
<part src="@staticbolt/docs/parts/table-of-content/table-of-content-mobile.part.html"></part><part maxHeading="3" minHeading="2" src="@staticbolt/docs/parts/table-of-content/table-of-content-desktop.part.html"></part>Built at build time from the page headings. The desktop one highlights the heading in view, the mobile one is an accordion above the content.
badge
<part src="@staticbolt/docs/parts/badge/badge.part.html" text="Beta" variant="warning"></part>Inline label. Variants: note, tip, important, warning, caution, success, danger. Beta
color-scheme-switch
Cycles light, dark, and system. The choice is stored in localStorage and applied before first paint. It dispatches color-scheme-changed on document, the mermaid script re-renders diagrams on it.