mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-27 11:28:38 +01:00
Place the endpoints list just under the description of each API
We needed to override Docsy's default page renderers to show it. Because the Client-Server API uses a different render chain than the other endpoint pages, we have to override two of Docsy's pages (`content.html` and `single.html`). In order to reduce duplication, we then put the shared content into a `spec-content.html` partial.
This commit is contained in:
parent
56d48eb3a8
commit
f03730455d
9
layouts/_partials/spec-content.html
Normal file
9
layouts/_partials/spec-content.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{{- /* Shared render for spec pages: title, optional description, endpoints list, body, and last-mod info. */ -}}
|
||||
<div class="td-content">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ partial "endpoints-toc.html" . }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "page-meta-lastmod.html" . }}
|
||||
</div>
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
<div class="td-content">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ define "main" }}
|
||||
{{ partial "spec-content.html" . }}
|
||||
{{ end }}
|
||||
|
|
|
|||
3
layouts/docs/single.html
Normal file
3
layouts/docs/single.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "spec-content.html" . }}
|
||||
{{ end }}
|
||||
Loading…
Reference in a new issue