Skip to content

Instantly share code, notes, and snippets.

@manton manton/layouts_index.html Secret
Last active May 28, 2019

Embed
What would you like to do?
{{ define "main" }}
<ul id="post-list">
{{ $paginator := .Paginate (union .Site.Taxonomies.categories.essays .Site.Taxonomies.categories.photos) 25 }}
{{ range $paginator.Pages }}
<li>
<article>
{{ if .Title }}
<section class="post-body">
<header>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
<section class="post-body">
{{ .Content }}
</section>
</section>
{{ else }}
{{ .Content }}
{{ end }}
<a href="{{ .Permalink }}" class="u-url">
<aside class="dates">
<time datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}" class="dt-published">→ {{ .Date.Format "3:04 PM, Jan 2" }}</time>
</aside>
</a>
</article>
</li>
<span class="separator"><span class="divider"></span></span>
{{ end }}
</ul>
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.