about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorYihui Xie2019-04-18 13:54:08 -0500
committerYihui Xie2019-04-18 13:54:08 -0500
commit91d31b38fb83b2305aa7dab11ba13ba33f600f58 (patch)
treef852e05c30d5cebf4467ec996669383d3fd83b49
parentd7e19b268c311759dc7edae9916774521ef1b2f8 (diff)
downloadhugo-xmin-91d31b38fb83b2305aa7dab11ba13ba33f600f58.tar.lz
hugo-xmin-91d31b38fb83b2305aa7dab11ba13ba33f600f58.tar.zst
hugo-xmin-91d31b38fb83b2305aa7dab11ba13ba33f600f58.zip
close #37: remove the deprecated preserveTaxonomyNames = true, and use .Page.Title to get the taxonomy names instead
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/_default/terms.html7
2 files changed, 2 insertions, 6 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 38e85d1..7147426 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -5,7 +5,6 @@ theme = "hugo-xmin"
 googleAnalytics = ""
 disqusShortname = ""
 ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
-preserveTaxonomyNames = true
 footnotereturnlinkcontents = "↩"
 
 [permalinks]
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 09b3785..1b515a5 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -3,12 +3,9 @@
 <h1>{{ .Title }}</h1>
 
 <ul class="terms">
-  {{ range $key, $value := .Data.Terms }}
+  {{ range .Data.Terms }}
   <li>
-    <a href="{{ (print "/" $.Data.Plural "/" $key | urlize) | relURL }}">
-      {{ $key }}
-    </a>
-    ({{ len $value }})
+    <a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> ({{ .Count }})
   </li>
   {{ end }}
 </ul>