summaryrefslogtreecommitdiff
path: root/layouts/partials/head.html
blob: adca4962febaa2d46dd91fcf89807094a619911a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1">

{{ range .AlternativeOutputFormats -}}
    {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

{{/* load mermaid if any mermaid code block */}}
{{ if .Page.Store.Get "hasMermaid" }}
    <script src="{{ "/js/meraid-9.0.0.min.js" | relURL }}"></script>
    <script>mermaid.initialize({ startOnLoad: true });</script>
{{ end }}

{{ with and .Site.Params.remark42 .Params.show_comments }}
    <script>
        var remark_config = {
            host: '{{ .host }}',
            site_id: '{{ .host }}',
            components: ['embed', 'last-comments'],
            max_shown_comments: {{ .max_shown_comments }},
            theme: '{{ .remark42.theme }}',
            page_title: '{{ .Title }}',
            locale: '{{ .locale }}',
            show_email_subscription: {{ .show_email_subscription }},
            simple_view: {{ .simple_view }}
        };

        !function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);
    </script>
{{ end }}

<link rel="stylesheet" href="{{ "/lib/icofont/icofont.min.css" | relURL }}" />
<link rel="stylesheet" href="{{ "/css/syntax.css" | relURL }}" />
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
<link rel="shortcut icon" href="{{ "/images/favicon.ico" | relURL }}" type="image/x-icon" />