diff options
author | Minos Park <m@minospark.com> | 2021-02-02 06:43:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 06:43:57 +0300 |
commit | 29ce095e7372a44794a94dd250a2ae7ad73de796 (patch) | |
tree | f46235dd9819868d4601f29a751ec807c9315844 | |
parent | 968bec8406c3afb1982c848200d26b9a11add03a (diff) |
use hugo function urlize
In addition to converting spaces to hyphens, sanitize the string. No practical difference 🤷 xD
https://gohugo.io/functions/urlize/
-rw-r--r-- | layouts/partials/list-taxonomy-terms.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/list-taxonomy-terms.html b/layouts/partials/list-taxonomy-terms.html index 9c813eb..f5eb67f 100644 --- a/layouts/partials/list-taxonomy-terms.html +++ b/layouts/partials/list-taxonomy-terms.html @@ -2,7 +2,7 @@ {{ range $term := .terms }} - {{ $term_path := lower (replace ($term) " " "-") }} + {{ $term_path := ($term | lower | urlize) }} {{ $term_page := site.GetPage (path.Join $.parent $term_path) }} {{ $url := $term_page.Permalink}} |