mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
fix: revert "fix: workaround Hugo GetPage/urlize bug with non-ASCII usernames"
This reverts commit 03af4df1
Ensure `removePathAccents = true` in `config.toml` to workaround the Hugo bug: https://github.com/gohugoio/hugo/issues/5687
Fix #1575
Fix #1563
This commit is contained in:
1 parent
a14d21f7c8
commit
94e6169320
4 files changed
+4
-4
No files matched your search
+1
-1
@@ -40,7 +40,7 @@
|
||||
{{- if gt $authorLen 0 -}}
|
||||
{{- $authors = slice -}}
|
||||
{{- range $k, $v := .Params.authors -}}
|
||||
{{- $person_page_path := (printf "/authors/%s" (anchorize $v)) -}}
|
||||
{{- $person_page_path := (printf "/authors/%s" (urlize $v)) -}}
|
||||
{{- $person_page := site.GetPage $person_page_path -}}
|
||||
{{- if and $person_page $person_page.File -}}
|
||||
{{- $person := $person_page.Params -}}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
{{ if .Params.authors }}
|
||||
{{ $first_author = index .Params.authors 0 }}
|
||||
{{ end }}
|
||||
{{ $author_urlized = anchorize $first_author }}
|
||||
{{ $author_urlized = urlize $first_author }}
|
||||
{{ end }}
|
||||
|
||||
{{ $site_type := site.Params.site_type | default "Person" }}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{ $author = $page.Params.author }}
|
||||
{{end}}
|
||||
|
||||
{{ $person_page_path := (printf "/authors/%s" (anchorize $author)) }}
|
||||
{{ $person_page_path := (printf "/authors/%s" (urlize $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 }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- $username := .Get 0 -}}
|
||||
{{- $username_url := $username | anchorize -}}
|
||||
{{- $username_url := $username | urlize -}}
|
||||
{{- $taxonomy := "authors" -}}
|
||||
{{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $username_url) -}}
|
||||
{{- $name := $profile_page.Params.name | default ($username|markdownify) -}}
|
||||
|
||||
Reference in new issue
Block a user