mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Fixes #784 Add a collapsible list of endpoints to the top of the page for each distinct spec. We do this by storing endpoint metadata on $page and creating a new partial, endpoints-toc.html, which renders it.
14 lines
507 B
HTML
14 lines
507 B
HTML
{{- /* Shared render for spec pages: title, optional description, endpoints list, body, and last-mod info. */ -}}
|
|
<div class="td-content">
|
|
<h1>{{ .Title }}</h1>
|
|
{{ with .Params.description }}<p class="page-description">{{ . | markdownify }}</p>{{ end }}
|
|
|
|
{{/*
|
|
Render an endpoints table of contents. This is the main difference
|
|
between our templates (which call the spec-content partial) and the default
|
|
Docsy template.
|
|
*/}}
|
|
{{ partial "endpoints-toc.html" . }}
|
|
|
|
{{ .Content }}
|
|
</div> |