Compare commits

...

2 Commits

Author SHA1 Message Date
balki a27278651e add trailing slash in tags link 2025-05-29 11:11:15 -04:00
balki d87c83c072 Add drafts list and refactor home with inline partials 2025-05-28 23:27:28 -04:00
2 changed files with 17 additions and 12 deletions
+15 -10
View File
@@ -6,20 +6,25 @@
{{ range .Site.Taxonomies.tags }}
<details>
<summary> <h3>{{ .Page.Title }} ({{ len . }})</h3> </summary>
<ul>
{{ range . }}
<li>
<time>{{ .Date.Format "2006/01/02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ol>
{{ partial "inline/postList.html" . }}
</details>
{{ end }}
{{- end }}
<h2>All Pages</h2>
{{ 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 .Site.RegularPages }}
{{ range . }}
<li>
<time>{{ .Date.Format "2006/01/02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
+2 -2
View File
@@ -9,13 +9,13 @@
{{ if .Params.tags }}
{{range .Params.tags}}
<a class="btn" href="/tags/{{ . | urlize }}" role="button">{{ . }}</a>
<a class="btn" href="/tags/{{ . | urlize }}/" role="button">{{ . }}</a>
{{end}}
{{end}}
{{ if .Params.categories }}
{{range .Params.categories}}
<a class="btn" href="/categories/{{ . | urlize }}" role="button">{{ . }}</a>
<a class="btn" href="/categories/{{ . | urlize }}/" role="button">{{ . }}</a>
{{end}}
{{end}}
{{- if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}