Add more comments to explain the render pipeline
parent
a815c3058d
commit
8f6715f44b
@ -1,14 +1,19 @@
|
||||
{{/*
|
||||
|
||||
A simplified version of the list.html partial in Docsy.
|
||||
Override the `layouts/docs/list.html` template from Docsy. While this template
|
||||
is equivalent to `single.html`, it's necessary to override both templates to
|
||||
avoid falling back to the default Docsy templates.
|
||||
|
||||
https://gohugo.io/templates/types/#list
|
||||
|
||||
We use this list template to render the Client-Server API spec page and each
|
||||
of its modules.
|
||||
|
||||
The contents of the "main" block below are inserted into the `./baseof.html`
|
||||
base template.
|
||||
|
||||
*/}}
|
||||
|
||||
{{ define "main" }}
|
||||
<div class="td-content">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Params.description }}<p class="page-description">{{ . | markdownify }}</p>{{ end }}
|
||||
{{ partial "endpoints-toc.html" . }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "spec-content.html" . }}
|
||||
{{ end }}
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
{{/*
|
||||
|
||||
Override the `layouts/docs/single.html` template from Docsy. While this template
|
||||
is equivalent to `list.html`, it's necessary to override both templates to
|
||||
avoid falling back to the default Docsy templates.
|
||||
|
||||
https://gohugo.io/templates/types/#single
|
||||
|
||||
We use this single template to render the all API spec pages *except* the
|
||||
Client-Server API. The Client-Server API spec page contains modules, and thus
|
||||
is handled separately.
|
||||
|
||||
The contents of the "main" block below are inserted into the `./baseof.html`
|
||||
base template.
|
||||
|
||||
*/}}
|
||||
{{ define "main" }}
|
||||
{{ partial "spec-content.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Loading…
Reference in New Issue