From 4ed72d85b2ed13917b851a642165bf57b6b59852 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 5 Mar 2020 20:53:13 +0000 Subject: [PATCH] fix: revert "fix: workaround Hugo GetPage/urlize bug with non-ASCII usernames" This commit completes 94e6169320faff9cdc3035fdf5951be8be8e6f1d in reverting commit 03af4df Ensure `removePathAccents = true` in `config.toml` to workaround the Hugo bug: gohugoio/hugo#5687 Fix #1575 Fix #1563 --- layouts/partials/functions/get_author_name.html | 2 +- layouts/partials/page_metadata_authors.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/functions/get_author_name.html b/layouts/partials/functions/get_author_name.html index 06ed3b3a..2c4b4896 100644 --- a/layouts/partials/functions/get_author_name.html +++ b/layouts/partials/functions/get_author_name.html @@ -12,7 +12,7 @@ {{ $author_username = $page.Scratch.Get "superuser_username" }} {{ else if $page.Params.authors }} {{ $author = index $page.Params.authors 0 }} - {{ $author_username = anchorize $author }} + {{ $author_username = urlize $author }} {{ end }} {{ $taxonomy := "authors" }} diff --git a/layouts/partials/page_metadata_authors.html b/layouts/partials/page_metadata_authors.html index 2b40aa22..ef685d5a 100644 --- a/layouts/partials/page_metadata_authors.html +++ b/layouts/partials/page_metadata_authors.html @@ -4,7 +4,7 @@ {{ with .Param $taxonomy }} {{ $link_authors := site.Params.link_authors | default true }} {{ range $index, $value := . }} - {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy (. | anchorize)) -}} + {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy (. | urlize)) -}} {{- $name := $profile_page.Params.name | default ($value|markdownify) -}} {{- if gt $index 0 }}, {{ end -}}