Merge pull request #15 from kazu634/change-post-list-page

List up the post category article only within post list page.
This commit is contained in:
Kazuhiro MUSASHI 2019-04-16 15:13:18 +07:00 committed by GitHub
commit 31e097494b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 0 deletions

32
layouts/post/single.html Normal file
View File

@ -0,0 +1,32 @@
{{ partial "header-content.html" . }}
<!-- Main Section Layout
-->
<main id="single" role="main">
<div class="article-header">
<h1>{{ .Title }}</h1>
<div class="meta">
{{ .Date.Format "Jan 2, 2006" }} &nbsp;
{{ range .Params.categories }}
#<a href="/categories/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}: {{ .Description }}
</div>
</div>
<article>
{{ .Content }}
</main>
<nav class="pagination">
{{ with .PrevInSection }}
<span class="previous">&larr; <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></span>
{{ end }}
{{ with .NextInSection }}
<span class="next"><a href="{{ .Permalink }}" rel="next">{{ .Title }}</a> &rarr;</span>
{{ end }}
</nav>
{{ partial "footer.html" . }}