Change the default list display a content and a list

Inside a section, you can have a name_of_the_section.md with a content displayed before the list
This commit is contained in:
Alexis Tacnet
2017-01-04 02:52:47 +01:00
parent da7658830c
commit 4a5e3eb1f4

View File

@@ -2,14 +2,23 @@
<section class="main"> <section class="main">
<div class="container"> <div class="container">
<div class="content"> <div class="content">
{{ $globalTitle := .Title}}
<div class="markdown">
{{ range .Data.Pages }}
{{ if eq .Title $globalTitle }}
{{ .Content }}
{{ end }}
{{ end }}
</div>
<div class="page-heading">{{ .Title }}</div> <div class="page-heading">{{ .Title }}</div>
<ul> <ul>
{{ range .Data.Pages.ByPublishDate }} {{ range .Data.Pages.ByPublishDate }}
{{ partial "li.html" . }} {{ if ne .Title $globalTitle }}
{{ partial "li.html" . }}
{{ end }}
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
</div> </div>
</section> </section>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}