2022-11-02 00:14:19 +01:00
|
|
|
{{- $to := .to }}
|
2022-11-15 07:34:06 +01:00
|
|
|
{{- $abs := .abs }}
|
2022-11-17 22:12:18 +01:00
|
|
|
{{- $basename := .basename }}
|
2022-11-02 00:14:19 +01:00
|
|
|
{{- $link := $to.RelPermalink }}
|
2022-11-15 07:34:06 +01:00
|
|
|
{{- if $abs }}
|
|
|
|
{{- $link = $to.Permalink }}
|
|
|
|
{{- end }}
|
2022-11-17 22:12:18 +01:00
|
|
|
{{- if not $basename }}
|
|
|
|
{{- $basename = "index" }}
|
|
|
|
{{- end }}
|
2022-11-11 13:44:23 +01:00
|
|
|
{{- if and (ne .Site.Params.disableExplicitIndexURLs true) (eq (substr $link -1) "/") }}
|
2022-11-17 22:12:18 +01:00
|
|
|
{{- $link = printf "%s%s.html" $link $basename }}
|
2022-11-02 00:14:19 +01:00
|
|
|
{{- end }}
|
|
|
|
{{- $link }}
|