I’m moving over from Jekyll and previously I had section under /archives that would list all my posts.
Right now when I go to /post I get something similar, however I want this to be available under /archives instead.
I’ve tried creating a layouts/archive/single.html
with the following:
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<div class="pure-g">
<div class="pure-u-1-24 pure-u-md-5-24"></div>
<div class="pure-u-11-12 pure-u-md-5-8">
<p class="posts-name">{{ .Title }}:</p>
<ul class="posts">
{{ $baseurl := .Site.BaseURL }}
{{ range $name, $page := .Data.Pages }}
{{ if eq .Type "post" }}
<li>
<a href="{{ .Permalink }}">{{ $page.Title }}</a>
<p class="footnote">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" class="post-list">{{ .Date.Format "Jan 2, 2006" }}</time>
{{ if or $page.Params.tags $page.Params.categories $page.Params.series }}
to
{{ end }}
{{ with $page.Params.tags }}
tags:[ {{ range $page.Params.tags}}<a href="{{ $baseurl }}tags/{{ . | urlize }}">{{ . }}</a> {{ end }}]
{{ end }}
</p>
</li>
{{ end }}
{{ end }}
</ul>
</div>
<div class="pure-u-1-24 pure-u-md-1-6"></div>
</div>
{{ partial "footer.html" . }}
However it doesn’t render a list of anything. I have to make a content/archives/index.md page to get anything to show up (and then its not a list).
Can someone point me in the right direction?