Commit 3674691 1 parent 102892d commit 3674691 Copy full SHA for 3674691
File tree 8 files changed +50
-16
lines changed
8 files changed +50
-16
lines changed Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html itemscope itemtype ="http://schema.org/WebPage " lang ="{{ .Site.Language.Lang }} " class ="no-js ">
2
+ < html itemscope itemtype ="http://schema.org/WebPage "
3
+ {{- with .Site.Language.LanguageDirection }} dir ="{{ . }} " {{- end -}}
4
+ {{ with .Site.Language.Lang }} lang ="{{ . }} " {{- end }} {{ /**/ -}}
5
+ class="no-js ">
3
6
< head >
4
7
{{ partial "head.html" . }}
5
8
</ head >
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html itemscope itemtype ="http://schema.org/WebPage " lang ="{{ .Site.Language.Lang }} " class ="no-js ">
2
+ < html itemscope itemtype ="http://schema.org/WebPage "
3
+ {{- with .Site.Language.LanguageDirection }} dir ="{{ . }} " {{- end -}}
4
+ {{ with .Site.Language.Lang }} lang ="{{ . }} " {{- end }} {{ /**/ -}}
5
+ class="no-js ">
3
6
< head >
4
7
{{ partial "head.html" . }}
5
8
</ head >
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html itemscope itemtype ="http://schema.org/WebPage " lang ="{{ .Site.Language.Lang }} " class ="no-js ">
2
+ < html itemscope itemtype ="http://schema.org/WebPage "
3
+ {{- with .Site.Language.LanguageDirection }} dir ="{{ . }} " {{- end -}}
4
+ {{ with .Site.Language.Lang }} lang ="{{ . }} " {{- end }} {{ /**/ -}}
5
+ class="no-js ">
3
6
< head >
4
7
{{ partial "head.html" . }}
5
8
</ head >
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html itemscope itemtype ="http://schema.org/WebPage " lang ="{{ .Site.Language.Lang }} " class ="no-js ">
2
+ < html itemscope itemtype ="http://schema.org/WebPage "
3
+ {{- with .Site.Language.LanguageDirection }} dir ="{{ . }} " {{- end -}}
4
+ {{ with .Site.Language.Lang }} lang ="{{ . }} " {{- end }} {{ /**/ -}}
5
+ class="no-js ">
3
6
< head >
4
7
{{ partial "head.html" . }}
5
8
</ head >
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html itemscope itemtype ="http://schema.org/WebPage " lang ="{{ .Site.Language.Lang }} " class ="no-js ">
2
+ < html itemscope itemtype ="http://schema.org/WebPage "
3
+ {{- with .Site.Language.LanguageDirection }} dir ="{{ . }} " {{- end -}}
4
+ {{ with .Site.Language.Lang }} lang ="{{ . }} " {{- end }} {{ /**/ -}}
5
+ class="no-js ">
3
6
< head >
4
7
{{ partial "head.html" . }}
5
8
</ head >
Original file line number Diff line number Diff line change
1
+ {{ $scssMain := "scss/main.scss" -}}
2
+ {{ $css := resources.Get $scssMain
3
+ | toCSS (dict "enableSourceMap" (not hugo.IsProduction)) -}}
4
+ {{ $rtlCSS :=
5
+ cond (eq .Site.Language.LanguageDirection "rtl")
6
+ (resources.Get "vendor/bootstrap/dist/css/bootstrap.rtl.css")
7
+ nil -}}
8
+
9
+ {{ if hugo.IsProduction -}}
10
+ {{ with $rtlCSS -}}
11
+ {{ $rtlCSS = . | postCSS | minify | fingerprint -}}
12
+ {{ end -}}
13
+ {{ $css = $css | postCSS | minify | fingerprint -}}
14
+ < link rel ="preload " href ="{{ $css.RelPermalink }} " as ="style ">
15
+ {{- end -}}
16
+
17
+ {{/* NOTE: when not in production, we don't apply `postCSS`. This makes it
18
+ snappier to develop in Chrome, but makes it look sub-optimal in other browsers.
19
+ */ -}}
1
20
2
- {{ $scssMain := "scss/main.scss"}}
3
- {{ if not hugo.IsProduction }}
4
- {{/* Note the missing postCSS. This makes it snappier to develop in Chrome, but makes it look sub-optimal in other browsers. */}}
5
- {{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" true) }}
6
21
< link href ="{{ $css.RelPermalink }} " rel ="stylesheet ">
7
- {{ else }}
8
- {{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" false) | postCSS | minify | fingerprint }}
9
- < link rel ="preload " href ="{{ $css.RelPermalink }} " as ="style ">
10
- < link href ="{{ $css.RelPermalink }} " rel ="stylesheet " integrity ="{{ $css.Data.integrity }} ">
11
- {{ end }}
22
+
23
+ {{ with $rtlCSS -}}
24
+ < link href ="{{ $rtlCSS.RelPermalink }} " rel ="stylesheet ">
25
+ {{ end -}}
26
+
27
+ {{- /**/ -}}
Original file line number Diff line number Diff line change 24
24
{{ template "_internal/opengraph.html" . -}}
25
25
{{ template "_internal/schema.html" . -}}
26
26
{{ template "_internal/twitter_cards.html" . -}}
27
- {{ partialCached "head-css.html" . "asdf" - }}
27
+ {{ partialCached "head-css.html" . "head-css-cache-key" }}
28
28
< script
29
29
src ="https://code.jquery.com/jquery-3.7.1.min.js "
30
30
integrity ="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g== "
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- < html itemscope itemtype ="http://schema.org/WebPage " lang ="{{ .Site.Language.Lang }} " class ="no-js ">
2
+ < html itemscope itemtype ="http://schema.org/WebPage "
3
+ {{- with .Site.Language.LanguageDirection }} dir ="{{ . }} " {{- end -}}
4
+ {{ with .Site.Language.Lang }} lang ="{{ . }} " {{- end }} {{ /**/ -}}
5
+ class="no-js ">
3
6
< head >
4
7
{{ partial "head.html" . }}
5
8
< title > {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</ title >
You can’t perform that action at this time.
0 commit comments