File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="{{ site.LanguageCode | default site.Language.Lang | default "en " }}" dir="{{ T "Reading-direction " | default "ltr" }}">
3
+ < head >
4
+ {{- $url := replace (replace .Permalink site.BaseURL "/") "//" "/" }}
5
+ {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }}
6
+ < meta charset ="utf-8 ">
7
+ < meta name ="robots " content ="noindex ">
8
+ < meta http-equiv ="refresh " content ="0; url={{ $url }} ">
9
+ {{- $link := "< link href =\ "%s\" rel=\"%s\" type=\"%s\" title=\"%s\"> " }}
10
+ < title > {{ $url }}</ title >
11
+
12
+ {{ (printf $link $url "canonical" "text/html" ($url | htmlEscape)) | safeHTML }}
13
+ </ head >
14
+ </ html >
Original file line number Diff line number Diff line change 1
1
{{- $to := .to }}
2
2
{{- $abs := .abs }}
3
3
{{- $basename := .basename }}
4
- {{- $link := $to.RelPermalink }}
5
- {{- if $abs }}
4
+ {{- $link := "" }}
5
+ {{- if isset . "link" }}
6
+ {{- $link = .link }}
7
+ {{- else if $abs }}
6
8
{{- $link = $to.Permalink }}
9
+ {{- else }}
10
+ {{- $link = $to.RelPermalink }}
7
11
{{- end }}
8
12
{{- if not $basename }}
9
13
{{- $basename = "index" }}
You can’t perform that action at this time.
0 commit comments