#132, add urlize to taxonomy templates
This commit is contained in:
parent
bce8940c62
commit
9888c52dbf
2 changed files with 6 additions and 5 deletions
|
@ -7,12 +7,13 @@
|
|||
|
||||
{{ range $term, $_ := .Site.Taxonomies }}
|
||||
{{ with $list := index $.Params $term }}
|
||||
<div>
|
||||
{{ range $n, $single := $list }}{{ if $n }}, {{ end }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $term $single) }}
|
||||
<a href="{{ .RelPermalink }}">{{ $single }}</a>
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $term $single | urlize) }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<br />
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<nav>
|
||||
<ul>
|
||||
{{ range $term, $_ := .Site.Taxonomies }}
|
||||
{{ with $.Site.GetPage (printf "/%s" $term) }}
|
||||
{{ with $.Site.GetPage (printf "/%s" $term | urlize) }}
|
||||
<li class="book-section-flat">
|
||||
<strong>{{ .Title | title }}</strong>
|
||||
<ul>
|
||||
|
|
Loading…
Reference in a new issue