Update to work with basic example site

This commit is contained in:
Lukas Joswiak 2020-05-15 17:47:34 -07:00
parent 1508189f9a
commit d4c3fe5c48
2 changed files with 11 additions and 13 deletions

View file

@ -3,11 +3,11 @@
<nav>
<ul>
<li><a href="{{ .Site.BaseURL }}">posts</a></li>
{{- range where .Site.Home.Pages "Section" "!=" "posts" -}}
{{ range where .Site.Home.Pages "Title" "!=" "Posts" }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{- end -}}
{{ end }}
</ul>
</nav>
</header>

View file

@ -1,13 +1,11 @@
<h3>Posts</h3>
{{ range where .Pages "Section" "posts" }}
<ul id="posts">
{{ range .Pages.ByDate.Reverse }}
<li>
<a href="{{ .Permalink }}">
{{- .Title -}}
<small><time>{{ .Date.Format "Jan 2, 2006" }}</time></small>
</a>
</li>
{{ end }}
</ul>
<ul id="posts">
{{ range where site.RegularPages "Type" "in" site.Params.mainSections }}
<li>
<a href="{{ .Permalink }}">
{{- .Title -}}
<small><time>{{ .Date.Format "Jan 2, 2006" }}</time></small>
</a>
</li>
{{ end }}
</ul>