Files
w3cjandClaude Opus 5.5 7ad844bc6a docs(site): heading icons, a 404 page and callouts
- Heading icons: a heading's icon attribute ({icon="rocket"}) puts a pixel
  icon before its text, through a heading render hook in place of Hextra's;
  the anchor stays the text's. The home page's five section headings get
  rocket, view-grid, shield, speech-balloon-question and prompt, lime at
  24px (2px per icon pixel, as Departure Mono's at 22px).
- A 404 page (layouts/404.html) on the site's navbar and footer: a VM's
  terminal (assets/home/not-found.svg) answering cd ./this-page with "no
  such page" and the blink cursor, Hextra's search box, and links to
  Getting started and the docs.
- Callouts: GitHub's > [!NOTE], [!TIP] and [!WARNING] alerts, drawn by a
  blockquote alert render hook in the site's palette with
  information-circled, a new light-bulb icon and warning; other types fail
  the build. Used for keeping network policy on (Your first VM), Docker's
  isolation (Docker), --unsafe-folder (Settings) and the VM boundary note
  (Staying safe), each moving the existing text.
- Contributing > Writing docs: heading icons, callouts, the 404 page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:41:26 -07:00

13 lines
769 B
HTML

{{- /* Hextra's heading, with an optional pixel icon before its text: `## Quick start {icon="rocket"}`. The icon
comes after the anchor is made, so the anchor is the text's alone. */ -}}
<h{{ .Level }} data-hextra-search-id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
{{- with .Attributes.icon -}}
{{- partial "icon.html" (dict "name" . "position" $.Position) }} {{ end -}}
{{- .Text | safeHTML -}}
{{- if gt .Level 1 -}}
<span class="hx:absolute hx:-mt-20" id="{{ .Anchor | safeURL }}"></span>
<a href="#{{ .Anchor | safeURL }}" class="subheading-anchor" aria-label="{{ (T "permalinkLabel") | default "Permalink for this section" }}"></a>
{{- end -}}
</h{{ .Level }}>
{{- /* Drop trailing newlines */ -}}