Initial commit
This commit is contained in:
29
layouts/section/archives.html
Normal file
29
layouts/section/archives.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ define "main" }}
|
||||
<!-- All of the site's posts grouped by year -->
|
||||
<h1>
|
||||
Archives
|
||||
</h1>
|
||||
<div>
|
||||
<!-- Group all the post pages from the same year -->
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{ range ($pages.GroupByDate "2006") }}
|
||||
<h3>{{ .Key }}</h3> <!-- Display the year -->
|
||||
|
||||
<ul class="archives-list">
|
||||
|
||||
{{ range (.Pages) }}
|
||||
|
||||
<li class="archives-list-item">
|
||||
<span class="archives-list-item-date">{{ .PublishDate.Format "Jan 2" }}</span>
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="page-footer"></div>
|
||||
|
||||
{{ end }}
|
10
layouts/section/tags.html
Normal file
10
layouts/section/tags.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<!-- Shows all of the site's tags -->
|
||||
<h1>Tags</h1>
|
||||
<ul>
|
||||
{{ range .Site.Taxonomies.tags }}
|
||||
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<div class="page-footer"></div>
|
||||
{{end}}
|
Reference in New Issue
Block a user