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