File tree 6 files changed +28
-26
lines changed
6 files changed +28
-26
lines changed Original file line number Diff line number Diff line change 136
136
{{- if eq .name "site" }}
137
137
< input type ="hidden " name ="{{ .name }} " value ="{{ $.root.Page.Permalink }} "/>
138
138
{{- else if eq .name "page" }}
139
- < input type ="hidden " name ="{{ .name }} " value ="{{ $.root.Page.URL }} "/>
139
+ < input type ="hidden " name ="{{ .name }} " value ="{{ $.root.Page.RelPermalink }} "/>
140
140
{{- else }}
141
141
< input type ="hidden " name ="{{ .name }} " value ="{{ .value }} "/>
142
142
{{- end -}}
Original file line number Diff line number Diff line change 78
78
class="row align-items-center justify-content-between mx-0 article-title">
79
79
{{- if $display_summary }}
80
80
< h4 class ="col px-0 m-0
81
- {{- if eq $.page.URL .URL }} active-page {{- end -}}
81
+ {{- if eq $.page.Permalink .Permalink }} active-page {{- end -}}
82
82
">
83
- < a href ="{{ .URL }} ">
83
+ < a href ="{{ .Permalink }} ">
84
84
{{- .Params.title | markdownify -}}
85
85
</ a >
86
86
</ h4 >
87
87
{{- else }}
88
88
< h5 class ="col px-0 m-0
89
- {{- if eq $.page.URL .URL }} active-page {{- end -}}
89
+ {{- if eq $.page.Permalink .Permalink }} active-page {{- end -}}
90
90
">
91
- < a href ="{{ .URL }} ">
91
+ < a href ="{{ .Permalink }} ">
92
92
{{- .Params.title | markdownify -}}
93
93
</ a >
94
94
</ h5 >
119
119
{{- end -}}
120
120
{{- end -}}
121
121
{{- if $self.Params.collapsible -}}
122
- < div class ="collapse {{- if eq $.page.URL .URL }} show {{- end }} ">
122
+ < div class ="collapse {{- if eq $.page.Permalink .Permalink }} show {{- end }} ">
123
123
{{- end -}}
124
124
{{- range $content_page }}
125
125
{{- if and (ne $self.Params.images false) .Params.asset -}}
150
150
{{- else -}}
151
151
{{- printf " badge-%s" "secondary" -}}
152
152
{{- end -}}
153
- " href="{{ .URL }} "> {{ i18n "content.readmore" | default "Read more..." }}</ a >
153
+ " href="{{ .Permalink }} "> {{ i18n "content.readmore" | default "Read more..." }}</ a >
154
154
{{- end -}}
155
155
{{- end -}}
156
156
{{- end -}}
165
165
{{- range $content_page }}
166
166
{{- if and (ne $self.Params.read_more false) (or $self.Params.read_more .Truncated) }}
167
167
< div class ="card-footer ">
168
- < a href ="{{ .URL }} "> {{ i18n "content.readmore" | default "Read more..." }}</ a >
168
+ < a href ="{{ .Permalink }} "> {{ i18n "content.readmore" | default "Read more..." }}</ a >
169
169
</ div >
170
170
{{- end -}}
171
171
{{- end -}}
Original file line number Diff line number Diff line change 39
39
< ul class ="navbar-nav ">
40
40
{{- if .Params.prepend -}}
41
41
{{- range sort .Params.prepend }}
42
- {{- $isMenuCurrent := or (eq $.root.URL .url) (eq (printf "%s/" $.root.URL ) .url) (eq $.root.URL (printf "%s/" .url)) -}}
42
+ {{- $isMenuCurrent := or (eq $.root.Permalink .url) (eq (printf "%s/" $.root.Permalink ) .url) (eq $.root.Permalink (printf "%s/" .url)) -}}
43
43
< li class ="nav-item ">
44
44
< a href ="{{ .url | relLangURL }} "
45
45
{{- if hasPrefix .URL "#" }}
54
54
{{- end }}
55
55
{{- if .Site.Menus.main -}}
56
56
{{- range sort .Site.Menus.main }}
57
- {{- $isMenuCurrent := or (eq $.root.URL .URL) (eq (printf "%s/" $.root.URL ) .URL) (eq $.root.URL (printf "%s/" .URL)) -}}
57
+ {{- $isMenuCurrent := or (eq $.root.Permalink .URL) (eq (printf "%s/" $.root.Permalink ) .URL) (eq $.root.Permalink (printf "%s/" .URL)) -}}
58
58
< li class ="nav-item ">
59
59
< a href ="{{ .URL | relLangURL }} "
60
60
{{- if hasPrefix .URL "#" }}
69
69
{{- end }}
70
70
{{- if .Params.postpend -}}
71
71
{{- range sort .Params.postpend }}
72
- {{- $isMenuCurrent := or (eq $.root.URL .url) (eq (printf "%s/" $.root.URL ) .url) (eq $.root.URL (printf "%s/" .url)) -}}
72
+ {{- $isMenuCurrent := or (eq $.root.Permalink .url) (eq (printf "%s/" $.root.Permalink ) .url) (eq $.root.Permalink (printf "%s/" .url)) -}}
73
73
< li class ="nav-item ">
74
74
< a href ="{{ .url | relLangURL }} "
75
75
{{- if hasPrefix .URL "#" }}
169
169
{{- print " aria-current=\ "page\"" -}}
170
170
{{- end -}}>
171
171
{{- if ne $.root . }}
172
- < a href ="{{ .URL -}} ">
172
+ < a href ="{{ .Permalink -}} ">
173
173
{{- .Title -}}
174
174
</ a >
175
175
{{- else }}
Original file line number Diff line number Diff line change 5
5
{{- if (isset . "data") -}}
6
6
{{- .page_scratch.Set "content_fragment_path" .data.content_fragment -}}
7
7
{{- .page_scratch.Set "content_page" .data.content_fragment -}}
8
- {{- .page_scratch.Set "url" .data.page.URL -}}
8
+ {{- .page_scratch.Set "url" .data.page.Permalink -}}
9
9
{{- else -}}
10
10
{{- .page_scratch.Set "content_fragment_path" .Params.content -}}
11
11
32
32
{{- end -}}
33
33
34
34
{{- $page := cond (eq (.page_scratch.Get "page") "") $.page (.page_scratch.Get "page") -}}
35
- {{- .page_scratch.Set "url" $page.URL -}}
35
+ {{- .page_scratch.Set "url" $page.Permalink -}}
36
36
{{- if (eq ($.page_scratch.Get "fragment_path") "index.md") -}}
37
37
{{- .page_scratch.Set "content_page" $page -}}
38
38
{{- else -}}
Original file line number Diff line number Diff line change 19
19
< meta name ="apple-mobile-web-app-status-bar-style " content ="black ">
20
20
< meta name ="description " content ="{{- .Scratch.Get "page_description " -}}">
21
21
< meta property ="og:title " content ="{{ $title }} ">
22
- < meta property ="og:url " content ="{{ .URL | absURL }} ">
22
+ < meta property ="og:url " content ="{{ .Permalink }} ">
23
23
< meta property ="og:description " content ="{{- .Scratch.Get "page_description " -}}">
24
24
< meta property ="og:site_name " content ="{{ .Site.Title }} ">
25
25
< meta property ="og:type " content ="website ">
26
26
< meta name ="twitter:card " content ="summary_large_image ">
27
27
< meta name ="twitter:title " content ="{{ $title }} " />
28
28
< meta name ="twitter:description " content ="{{- .Scratch.Get "page_description " -}}">
29
- < meta name ="twitter:url " content ="{{ .URL | absURL }} " />
29
+ < meta name ="twitter:url " content ="{{ .Permalink }} " />
30
30
{{- if $content_fragment -}}
31
31
{{- range $content_fragment -}}
32
32
{{- if and .Params.asset -}}
Original file line number Diff line number Diff line change 151
151
{{- if $page_scratch.Get "fragments" -}}
152
152
{{- range ($page_scratch.Get "fragments") -}}
153
153
{{- $name := replace .Name "/index" "" -}}
154
- {{- $directory_same_name := in ($page_scratch.Get "fragments_directory_name") (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
155
- {{- if and (not .Params.disabled) (isset .Params "fragment") (not (where ($page_scratch.Get "page_fragments") ".Name" $name)) (not $directory_same_name) -}}
156
- {{- if or $is_404 (ne .Params.fragment "404") -}}
157
- {{- if eq .Params.fragment "config" -}}
158
- {{- $page_scratch.Add "page_config" . -}}
159
- {{- else -}}
160
- {{- $page_scratch.Add "page_fragments" . -}}
161
- {{- $page_scratch.Add "fragments_directory_name" (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
162
- {{- if isset .Params "padding" -}}
163
- {{- $page_scratch.Add "experimentals_used_messages" "FrontMatter variable 'padding' is experimental and may get removed without notice" -}}
154
+ {{- if $root.File -}}
155
+ {{- $directory_same_name := in ($page_scratch.Get "fragments_directory_name") (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
156
+ {{- if and (not .Params.disabled) (isset .Params "fragment") (not (where ($page_scratch.Get "page_fragments") ".Name" $name)) (not $directory_same_name) -}}
157
+ {{- if or $is_404 (ne .Params.fragment "404") -}}
158
+ {{- if eq .Params.fragment "config" -}}
159
+ {{- $page_scratch.Add "page_config" . -}}
160
+ {{- else -}}
161
+ {{- $page_scratch.Add "page_fragments" . -}}
162
+ {{- $page_scratch.Add "fragments_directory_name" (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
163
+ {{- if isset .Params "padding" -}}
164
+ {{- $page_scratch.Add "experimentals_used_messages" "FrontMatter variable 'padding' is experimental and may get removed without notice" -}}
165
+ {{- end -}}
164
166
{{- end -}}
165
167
{{- end -}}
166
168
{{- end -}}
You can’t perform that action at this time.
0 commit comments