2022-11-13 15:36:40 +00:00
{{- $page := .page }}
2023-09-21 15:23:41 +00:00
{{- $content := "" }}
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
{{- if $url }}
2024-04-24 21:05:13 +00:00
{{- /* if we have a relative link in a print page, our print URL is one level to deep; so we are making it absolute to our page by prepending the page's permalink */}}
2023-09-21 15:23:41 +00:00
{{- $link_prefix := strings.TrimRight "/" $page.RelPermalink }}
2024-08-27 07:31:26 +00:00
{{- $content = partial "output-partial.hugo" (dict "base" "content" "page" $page "parameter" $page) }}
2023-09-21 15:23:41 +00:00
{{- $content = replaceRE "((?:src|href)\\s*=(?:\\s*[\"']\\s*)?)(\\.[^\"'\\s>]*|[\\w]+[^\"'\\s>:]*)([\"'\\s>])" (printf "${1}%s/${2}${3}" $link_prefix) $content }}
{{- end }}
{{- if $page.Title }}
2024-08-27 07:31:26 +00:00
{{- partial "output-partial.hugo" (dict "base" "article" "page" $page "parameter" (dict "page" $page "content" $content)) }}
2023-09-21 15:23:41 +00:00
{{- end }}