- WinterCMS-style shell: header with search and theme toggle, grouped sidebar, on-page TOC, pager, page actions, callouts, heading permalinks, footer and a 404 page - fenced code highlighted at build time by chroma/v2 into tok-* classes, with a copy button; no inline script, style or handler - vendored DM Sans/DM Mono fonts and Lucide icons with their licences - client-side search over search-index.json built with textContent only - summer docs:serve builds into a temp dir, serves on loopback by default, returns 404.html with status 404 and rebuilds on change
63 lines
1.7 KiB
HTML
63 lines
1.7 KiB
HTML
{{define "head" -}}
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="color-scheme" content="light dark">
|
|
<title>{{.DocTitle}}</title>
|
|
<meta name="description" content="{{.Description}}">
|
|
<meta property="og:title" content="{{.Title}}">
|
|
<meta property="og:description" content="{{.Description}}">
|
|
{{- if .MarkdownURL}}
|
|
<link rel="alternate" type="text/markdown" href="{{.MarkdownURL}}">
|
|
{{- end}}
|
|
<script src="{{.Assets}}/theme-init.js"></script>
|
|
<link rel="stylesheet" href="{{.Assets}}/site.css">
|
|
<script src="{{.Assets}}/site.js" defer></script>
|
|
<script src="{{.Assets}}/search.js" defer></script>
|
|
{{- end -}}
|
|
{{define "shell-start" -}}
|
|
<a class="skip-link" href="#content">Skip to content</a>
|
|
{{template "header" .}}
|
|
<div class="layout">
|
|
{{template "sidebar" .}}
|
|
<div class="scrim" hidden></div>
|
|
{{- end -}}
|
|
{{define "shell-end" -}}
|
|
</div>
|
|
{{template "search" .}}
|
|
<div class="sr-only" id="live-region" aria-live="polite"></div>
|
|
{{- end -}}
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
{{template "head" .}}
|
|
</head>
|
|
<body class="docs">
|
|
{{template "shell-start" .}}
|
|
<main id="content" tabindex="-1">
|
|
<div class="page{{if .TOC}} has-toc{{end}}">
|
|
<article class="page-body">
|
|
{{- if .Eyebrow}}
|
|
<p class="eyebrow">{{.Eyebrow}}</p>
|
|
{{- end}}
|
|
<h1>{{.Title}}</h1>
|
|
<p class="lead">{{.Description}}</p>
|
|
<div class="page-actions">
|
|
{{- if .EditURL}}
|
|
<a href="{{.EditURL}}">{{template "icon-pencil"}}<span>Edit this page</span></a>
|
|
{{- end}}
|
|
<a href="{{.MarkdownURL}}">{{template "icon-file-text"}}<span>View as Markdown</span></a>
|
|
</div>
|
|
{{template "toc-inline" .}}
|
|
<div class="prose">
|
|
{{.Content}}
|
|
</div>
|
|
{{template "pager" .}}
|
|
</article>
|
|
{{template "toc" .}}
|
|
</div>
|
|
{{template "footer" .}}
|
|
</main>
|
|
{{template "shell-end" .}}
|
|
</body>
|
|
</html>
|