properly format metadata and previous and next pages
This commit is contained in:
parent
94d498f0e1
commit
b31611af40
4 changed files with 32 additions and 17 deletions
|
@ -11,15 +11,9 @@
|
|||
{{ if .Params.showMetadata | default true }}
|
||||
<section class="postMetadata">
|
||||
<dl>
|
||||
{{ with .GetTerms "tags" }}
|
||||
{{ partial "taxonomy/tags.html" . }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "authors" }}
|
||||
{{ partial "taxonomy/authors.html" . }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "categories" }}
|
||||
{{ partial "taxonomy/categories.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.published | default true }}
|
||||
<dt>{{ i18n "published" }}</dt>
|
||||
{{ $formattedDate := .Date.Format "2006-01-02" }}
|
||||
|
@ -29,16 +23,14 @@
|
|||
<dt>{{ i18n "reading_time" }}</dt>
|
||||
<dd>{{ i18n "reading_time_desc" .ReadingTime }}</dd>
|
||||
{{ end }}
|
||||
{{ with .GetTerms "categories" }}
|
||||
{{ partial "taxonomy/categories.html" . }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "tags" }}
|
||||
{{ partial "taxonomy/tags.html" . }}
|
||||
{{ end }}
|
||||
</dl>
|
||||
{{ $pages := .CurrentSection.Pages.ByWeight }}
|
||||
|
||||
{{ with $pages.Prev . }}
|
||||
<a href="{{ .RelPermalink }}">« Entrada anterior</a>
|
||||
{{ end }}
|
||||
/
|
||||
{{ with $pages.Next . }}
|
||||
<a href="{{ .RelPermalink }}">Entrada siguiente »</a>
|
||||
{{ end }}
|
||||
{{ template "partials/prev-next.html" . }}
|
||||
</section>
|
||||
{{ end }}
|
||||
<div>
|
||||
|
@ -66,9 +58,11 @@
|
|||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</section>
|
||||
</br>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue