link.html 2.2 KB
Newer Older
D
Dillon 已提交
1 2
{{- $scratch := .Scratch.Get "scratch" -}}
{{- $CDN := $scratch.Get "CDN" -}}
D
Dillon 已提交
3

D
Dillon ZENG 已提交
4
<link rel="canonical" href="{{ .Permalink }}" />
5
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
D
Dillon ZENG 已提交
6 7 8 9 10
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
D
Dillon 已提交
11 12 13 14 15 16 17 18

{{- if .PrevInSection -}}
    <link rel="prev" href="{{ .PrevInSection.Permalink }}" />
{{- end -}}
{{- if .NextInSection -}}
    <link rel="next" href="{{ .NextInSection.Permalink }}" />
{{- end -}}

D
Dillon 已提交
19
{{- with .OutputFormats.Get "RSS" -}}
D
Dillon 已提交
20 21
    <link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
    <link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
D
Dillon 已提交
22
{{- end -}}
D
Dillon 已提交
23

24
{{- /* Font Awesome */ -}}
D
Dillon 已提交
25
{{- with $CDN.fontawesomeFreeCSS -}}
D
Dillon 已提交
26
    {{- . | safeHTML -}}
D
Dillon 已提交
27
{{- else -}}
28 29 30
    {{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}}
    {{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
    {{- partial "plugin/stylesheet.html" $stylesheet -}}
D
Dillon 已提交
31
{{- end -}}
D
Dillon 已提交
32

33
{{- /* Animate.css */ -}}
D
Dillon 已提交
34
{{- with $CDN.animateCSS -}}
D
Dillon 已提交
35
    {{- . | safeHTML -}}
D
Dillon 已提交
36
{{- else -}}
37 38 39
    {{- $res := resources.Get "lib/fontawesome-free/all.min.css" -}}
    {{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
    {{- partial "plugin/stylesheet.html" $stylesheet -}}
D
Dillon 已提交
40
{{- end -}}
41 42 43 44 45 46 47

{{- /* style.min.css */ -}}
{{- $res := resources.Get "css/style.template.scss" -}}
{{- $options := dict "targetPath" "css/style.min.css" -}}
{{- $options  = dict "includePaths" (slice "config/css") | merge $options -}}
{{- $options  = dict "outputStyle" "compressed" | merge $options -}}
{{- $options  = dict "enableSourceMap" true | merge $options -}}
48 49 50
{{- $res = resources.ExecuteAsTemplate "style.scss" . $res | toCSS $options -}}
{{- $stylesheet := (dict "resource" $res "fingerprint" ($scratch.Get "fingerprint")) -}}
{{- partial "plugin/stylesheet.html" $stylesheet -}}