hugo-theme-relearn/layouts/partials/relLangPrettyUglyURL.hugo

7 lines
No EOL
234 B
Text

{{- $page := .page }}
{{- $to := .to }}
{{- $link := $to.RelPermalink }}
{{- if and (ne .page.Site.Params.disableExplicitIndexURLs true) (eq (substr $link -1) "/") }}
{{- $link = printf "%sindex.html" $link }}
{{- end }}
{{- $link }}