mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-07-16 11:41:27 +00:00
#132, add urlize to taxonomy templates
This commit is contained in:
parent
bce8940c62
commit
9888c52dbf
@ -7,12 +7,13 @@
|
|||||||
|
|
||||||
{{ range $term, $_ := .Site.Taxonomies }}
|
{{ range $term, $_ := .Site.Taxonomies }}
|
||||||
{{ with $list := index $.Params $term }}
|
{{ with $list := index $.Params $term }}
|
||||||
|
<div>
|
||||||
{{ range $n, $single := $list }}{{ if $n }}, {{ end }}
|
{{ range $n, $single := $list }}{{ if $n }}, {{ end }}
|
||||||
{{ with $.Site.GetPage (printf "/%s/%s" $term $single) }}
|
{{ with $.Site.GetPage (printf "/%s/%s" $term $single | urlize) }}
|
||||||
<a href="{{ .RelPermalink }}">{{ $single }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<br />
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range $term, $_ := .Site.Taxonomies }}
|
{{ range $term, $_ := .Site.Taxonomies }}
|
||||||
{{ with $.Site.GetPage (printf "/%s" $term) }}
|
{{ with $.Site.GetPage (printf "/%s" $term | urlize) }}
|
||||||
<li class="book-section-flat">
|
<li class="book-section-flat">
|
||||||
<strong>{{ .Title | title }}</strong>
|
<strong>{{ .Title | title }}</strong>
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user