github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/relLangPrettyUglyURL.hugo (about)

     1  {{- $to := .to }}
     2  {{- $abs := .abs }}
     3  {{- $basename := .basename }}
     4  {{- $link := "" }}
     5  {{- if isset . "link" }}
     6  	{{- $link = .link }}
     7  {{- else if not $to }}
     8  {{- else if $abs }}
     9  	{{- $link = $to.Permalink }}
    10  {{- else }}
    11  	{{- $link = $to.RelPermalink }}
    12  {{- end }}
    13  {{- if not $basename }}
    14  	{{- $basename = "index" }}
    15  {{- end }}
    16  {{- if and (ne site.Params.disableExplicitIndexURLs true) (eq (substr $link -1) "/") }}
    17  	{{- $link = printf "%s%s.html" $link $basename }}
    18  {{- end }}
    19  {{- $link }}