You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
465 B
18 lines
465 B
{{- $to := .to }}
|
|
{{- $abs := .abs }}
|
|
{{- $basename := .basename }}
|
|
{{- $link := "" }}
|
|
{{- if isset . "link" }}
|
|
{{- $link = .link }}
|
|
{{- else if $abs }}
|
|
{{- $link = $to.Permalink }}
|
|
{{- else }}
|
|
{{- $link = $to.RelPermalink }}
|
|
{{- end }}
|
|
{{- if not $basename }}
|
|
{{- $basename = "index" }}
|
|
{{- end }}
|
|
{{- if and (ne site.Params.disableExplicitIndexURLs true) (eq (substr $link -1) "/") }}
|
|
{{- $link = printf "%s%s.html" $link $basename }}
|
|
{{- end }}
|
|
{{- $link }} |