feat: Move to pageslist partial

main
earnest ma 2021-11-30 09:56:53 -05:00
parent 51b3d3fbec
commit 55e42857e8
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
3 changed files with 18 additions and 20 deletions

View File

@ -10,15 +10,7 @@
{{ end }}
</ul>
{{ else }}
<h3>Subpages:</h3>
<ul>
<li><a href="..">Go back</a></li>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a> <br>
</li>
{{ end }}
</ul>
{{ partial "pageslist.html" }}
{{ end }}
<hr>

View File

@ -1,13 +1,11 @@
{{ define "main" }}
<h3>Subpages:</h3>
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a> <br>
</li>
{{ partial "pageslist.html" }}
<hr>
<h2>{{ .Title }}</h2>
{{ if $.Params.enabletoc }}
<div class="toc">
{{ .Page.TableOfContents }}
</div>
{{ end }}
</ul>
{{ .Content }}
{{ end }}

View File

@ -0,0 +1,8 @@
<ul>
<li><a href="..">Go back</a></li>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>