diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index b4c4855790..c0663d39e0 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -287,9 +287,9 @@ {{- end }} {{- /* Verify that a glossary term page exists for the given term. */}} - {{- if site.GetPage (urls.JoinPath $basePath $termGiven) }} + {{- if site.GetPage (urls.JoinPath $basePath ($termGiven | urlize)) }} {{- $termActual = $termGiven }} - {{- else if site.GetPage (urls.JoinPath $basePath $termSingular) }} + {{- else if site.GetPage (urls.JoinPath $basePath ($termSingular | urlize)) }} {{- $termActual = $termSingular}} {{- else }} {{- $msg := printf "The %q render hook was unable to find a defintion for either the singular or plural form of the term %q: see %s" $renderHookName $termGiven $contentPath }} diff --git a/layouts/shortcodes/gl.html b/layouts/shortcodes/gl.html index 7341a7e942..c1c2312a54 100644 --- a/layouts/shortcodes/gl.html +++ b/layouts/shortcodes/gl.html @@ -24,9 +24,9 @@ {{- with $gp :=site.GetPage $basePath }} {{- /* Validate the given term using its singular and plural forms. */}} - {{- if site.GetPage (urls.JoinPath $basePath $termGiven) }} + {{- if site.GetPage (urls.JoinPath $basePath ($termGiven | urlize)) }} {{- $termActual = $termGiven }} - {{- else if site.GetPage (urls.JoinPath $basePath $termSingular) }} + {{- else if site.GetPage (urls.JoinPath $basePath ($termSingular | urlize)) }} {{- $termActual = $termSingular}} {{- else }} {{- errorf "The glossary link (%s) shortcode was unable to find a defintion for either the singular or plural form of the term %q: see %s" $.Name $termGiven $.Position }}