mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
layouts: let hugo generate URLs to taxonomy terms
This commit is contained in:
parent
3eedfa1f8d
commit
1c9e1eb694
@ -7,13 +7,13 @@
|
||||
</article>
|
||||
<div class="mw8 center">
|
||||
<section class="ph4">
|
||||
{{ range $key, $value := .Data.Terms }}
|
||||
{{ range $term := .Data.Pages }}
|
||||
<h2 class="f1">
|
||||
<a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}" class="link blue hover-black">
|
||||
{{ $.Data.Singular | humanize }}: {{ $key }}
|
||||
<a href="{{ $term.RelPermalink }}" class="link blue hover-black">
|
||||
{{ $.Data.Singular | humanize }}: {{ $term.LinkTitle }}
|
||||
</a>
|
||||
</h2>
|
||||
{{ range $value.Pages }}
|
||||
{{ range $term.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<ul class="pa0">
|
||||
{{ range .Params.tags }}
|
||||
{{ range .GetTerms "tags" }}
|
||||
<li class="list di">
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="link f5 grow no-underline br-pill ba ph3 pv2 mb2 dib black sans-serif">
|
||||
{{- . -}}
|
||||
<a href="{{ .RelPermalink }}" class="link f5 grow no-underline br-pill ba ph3 pv2 mb2 dib black sans-serif">
|
||||
{{- .LinkTitle -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user