summaryrefslogtreecommitdiffhomepage
path: root/web/layouts
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 20:30:22 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-25 20:30:22 -0600
commit1101f029610080c53ac857a258c6b1b0b64c4b88 (patch)
treeb2004564119085d0f75ba9043f6bdf4c55a5239b /web/layouts
parentdeb0ed011fe2cfc7058facb3f63b7feaeb8d4a8e (diff)
downloadzash-chore/c23-idioms.tar.gz
web: the specification as a page, converted from typst's HTMLchore/c23-idioms
typst writes no markdown, so the site had the typeset HTML export and no page that a reader could search or link into. web/spec-md.py reduces the export to what goldmark reads and hands it to pandoc, then puts back the heading ids the spec cross-references itself by and carries the MathML over untouched: browsers render it, so the page ships no TeX script. `make docs` writes it with the other document pages, and the site stays hand-written pages until someone runs that.
Diffstat (limited to 'web/layouts')
-rw-r--r--web/layouts/partials/docs-nav.html6
-rw-r--r--web/layouts/single.html4
2 files changed, 7 insertions, 3 deletions
diff --git a/web/layouts/partials/docs-nav.html b/web/layouts/partials/docs-nav.html
index 213a1eb..8f691b5 100644
--- a/web/layouts/partials/docs-nav.html
+++ b/web/layouts/partials/docs-nav.html
@@ -1,5 +1,7 @@
{{ with site.GetPage "/docs" }}
<aside>
+ {{ $spec := "zash-spec" | relURL }}
+ {{ $ref := "reference/" | relURL }}
<div class="group">
<h2>Docs</h2>
{{ range .Pages.ByWeight }}
@@ -10,7 +12,9 @@
<h2>Source</h2>
<a href="{{ site.Params.repo }}/blob/main/README.md">README</a>
<a href="{{ site.Params.repo }}/blob/main/DESIGN.md">DESIGN.md</a>
- <a href="{{ site.Params.repo }}/blob/main/formal/zash-spec.pdf">Specification (PDF)</a>
+ <a href="{{ $spec }}.html">Specification (typeset HTML)</a>
+ <a href="{{ $spec }}.pdf">Specification (PDF)</a>
+ <a href="{{ $ref }}">Source reference</a>
</div>
</aside>
{{ end }}
diff --git a/web/layouts/single.html b/web/layouts/single.html
index 8171148..aef02ce 100644
--- a/web/layouts/single.html
+++ b/web/layouts/single.html
@@ -5,12 +5,12 @@
<article>
<div class="docs-head">
<p class="kicker">docs</p>
- <h1>{{ .Title }}</h1>
+ {{ if not .Params.notitle }}<h1>{{ .Title }}</h1>{{ end }}
{{ with .Description }}<p class="lede">{{ . }}</p>{{ end }}
</div>
{{ .Content }}
<p class="edit">
- <a href="{{ site.Params.repo }}/edit/main/web/content/{{ .File.Path }}">Edit this page</a>
+ <a href="{{ site.Params.repo }}/edit/main/{{ with .Params.source }}{{ . }}{{ else }}web/content/{{ $.File.Path }}{{ end }}">Edit this page</a>
</p>
</article>
</div>