Add tags to index.html

This commit is contained in:
Balakrishnan Balasubramanian 2025-05-20 01:05:47 -04:00
parent 2060a81f1a
commit 3a02cdc96e
2 changed files with 28 additions and 9 deletions

View File

@ -1,12 +1,26 @@
{{ define "main" }} {{ define "main" }}
{{ .Content }} {{ .Content }}
<h2>Posts</h2> <h2>Tags</h2>
<ul> {{ range .Site.Taxonomies.tags }}
{{ range first 100 ( where .Site.RegularPages "Section" "posts" ) }} <details>
<li> <summary> <h3>{{ .Page.Title }} ({{ len . }})</h3> </summary>
<time>{{ .Date.Format "2006/01/02" }}</time> <ul>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> {{ range . }}
</li> <li>
{{ end }} <time>{{ .Date.Format "2006/01/02" }}</time>
</ul> <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ol>
</details>
{{ 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 }} {{ end }}

View File

@ -629,3 +629,8 @@ body {
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
} }
summary > h3 {
color: purple;
display: inline;
}