Add drafts list and refactor home with inline partials
This commit is contained in:
parent
c93379bf7c
commit
d87c83c072
@ -6,6 +6,23 @@
|
||||
{{ range .Site.Taxonomies.tags }}
|
||||
<details>
|
||||
<summary> <h3>{{ .Page.Title }} ({{ len . }})</h3> </summary>
|
||||
{{ partial "inline/postList.html" . }}
|
||||
</details>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ with where .Site.RegularPages "Draft" true }}
|
||||
<h2>Drafts</h2>
|
||||
{{ partial "inline/postList.html" . }}
|
||||
{{ end }}
|
||||
{{ with where .Site.RegularPages "Draft" false }}
|
||||
<h2>All Pages</h2>
|
||||
{{ partial "inline/postList.html" . }}
|
||||
{{ else }}
|
||||
<p>No pages found</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/inline/postList.html" }}
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li>
|
||||
@ -13,17 +30,5 @@
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</details>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
<h2>All Pages</h2>
|
||||
<ul>
|
||||
{{ range .Site.RegularPages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "2006/01/02" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user