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-19 15:05:59 +00:00
|
|
|
{{- $link := "" }}
|
|
|
|
{{- if isset . "link" }}
|
|
|
|
{{- $link = .link }}
|
|
|
|
{{- else if $abs }}
|
2022-11-15 06:34:06 +00:00
|
|
|
{{- $link = $to.Permalink }}
|
2022-11-19 15:05:59 +00:00
|
|
|
{{- else }}
|
|
|
|
{{- $link = $to.RelPermalink }}
|
2022-11-15 06:34:06 +00:00
|
|
|
{{- end }}
|
2022-11-17 21:12:18 +00:00
|
|
|
{{- if not $basename }}
|
|
|
|
{{- $basename = "index" }}
|
|
|
|
{{- end }}
|
2023-03-24 17:47:52 +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 }}
|