github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/nested-content.hugo (about) 1 {{- $page := .page }} 2 {{- $outputFormat := .outputFormat }} 3 {{- $content := "" }} 4 {{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }} 5 {{- if $url }} 6 {{- $c:=""}}{{/* 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 */}} 7 {{- $link_prefix := strings.TrimRight "/" $page.RelPermalink }} 8 {{- $content = partial "output-partial.hugo" (dict "base" "content" "page" $page "parameter" $page "outputFormat" $outputFormat) }} 9 {{- $content = replaceRE "((?:src|href)\\s*=(?:\\s*[\"']\\s*)?)(\\.[^\"'\\s>]*|[\\w]+[^\"'\\s>:]*)([\"'\\s>])" (printf "${1}%s/${2}${3}" $link_prefix) $content }} 10 {{- end }} 11 {{- if $page.Title }} 12 {{- partial "output-partial.hugo" (dict "base" "article" "page" $page "parameter" (dict "page" $page "content" $content "outputFormat" $outputFormat) "outputFormat" $outputFormat) }} 13 {{- end }}