diff --git a/layouts/index.json b/layouts/index.json index 4e9f95d7..50ff9ce8 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -40,7 +40,7 @@ {{- if gt $authorLen 0 -}} {{- $authors = slice -}} {{- range $k, $v := .Params.authors -}} - {{- $person_page_path := (printf "/authors/%s" (urlize $v)) -}} + {{- $person_page_path := (printf "/authors/%s" (anchorize $v)) -}} {{- $person_page := site.GetPage $person_page_path -}} {{- if and $person_page $person_page.File -}} {{- $person := $person_page.Params -}} diff --git a/layouts/partials/functions/get_author_name.html b/layouts/partials/functions/get_author_name.html index 2c4b4896..06ed3b3a 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 = urlize $author }} + {{ $author_username = anchorize $author }} {{ end }} {{ $taxonomy := "authors" }} diff --git a/layouts/partials/page_author.html b/layouts/partials/page_author.html index d1307369..18c70297 100644 --- a/layouts/partials/page_author.html +++ b/layouts/partials/page_author.html @@ -14,7 +14,7 @@ {{ if .Params.authors }} {{ $first_author = index .Params.authors 0 }} {{ end }} - {{ $author_urlized = urlize $first_author }} + {{ $author_urlized = anchorize $first_author }} {{ end }} {{ $site_type := site.Params.site_type | default "Person" }} diff --git a/layouts/partials/page_metadata_authors.html b/layouts/partials/page_metadata_authors.html index be5cfd52..d9e8d537 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 (. | urlize)) -}} + {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy (. | anchorize)) -}} {{- $name := $profile_page.Params.name | default ($value|markdownify) -}} {{- if gt $index 0 }}, {{ end -}} diff --git a/layouts/partials/widgets/about.html b/layouts/partials/widgets/about.html index 50bd1b42..f470de97 100644 --- a/layouts/partials/widgets/about.html +++ b/layouts/partials/widgets/about.html @@ -8,7 +8,7 @@ {{ $author = $page.Params.author }} {{end}} -{{ $person_page_path := (printf "/authors/%s" (urlize $author)) }} +{{ $person_page_path := (printf "/authors/%s" (anchorize $author)) }} {{ $person_page := site.GetPage $person_page_path }} {{ if not $person_page }} {{ errorf "Could not find an author page at `%s`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist. See https://sourcethemes.com/academic/docs/page-builder/#about " $person_page_path }} diff --git a/layouts/shortcodes/mention.html b/layouts/shortcodes/mention.html index 3eb5e02b..1ac54108 100644 --- a/layouts/shortcodes/mention.html +++ b/layouts/shortcodes/mention.html @@ -1,5 +1,5 @@ {{- $username := .Get 0 -}} -{{- $username_url := $username | urlize -}} +{{- $username_url := $username | anchorize -}} {{- $taxonomy := "authors" -}} {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $username_url) -}} {{- $name := $profile_page.Params.name | default ($username|markdownify) -}}