diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 12 | ||||
-rw-r--r-- | layouts/partials/header.html | 4 | ||||
-rw-r--r-- | layouts/partials/katex.html | 3 | ||||
-rw-r--r-- | layouts/partials/processed-content.html | 2 |
5 files changed, 13 insertions, 10 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 5156707..a754014 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,7 +2,7 @@ {{ $darkAccent := .Site.Params.Style.darkAccent | default .Site.Data.default.style.darkAccent }} {{ $lightAccent := .Site.Params.Style.lightAccent | default .Site.Data.default.style.lightAccent }} -<!-- Custom footer or default copyright --> +<!-- Custom or default copyright --> {{ if or (templates.Exists "partials/custom/copyright") (templates.Exists "partials/custom/copyright.html") }} {{ partial "custom/copyright" . }} {{ else }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5ede204..2d334f8 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -374,14 +374,18 @@ {{ end }} +<!-- Preload fonts --> +{{ range (readDir "/public/fonts") }} + <link rel="preload" href="{{ printf "/fonts/%s" .Name | relURL }}" as="font" crossorigin="anonymous"> +{{ end }} + <!-- Should be loaded even if browser has native lazy load support --> {{ $lazysizes := resources.Get "libs/lazysizes@5.2.2/lazysizes.min.js" | resources.ExecuteAsTemplate "js/lazysizes.min.js" . | minify | resources.Fingerprint "sha512" }} -<script defer src="{{ $lazysizes.RelPermalink }}" integrity="{{ $lazysizes.Data.Integrity }}" crossorigin="anonymous"></script> - +<script defer src="{{ $lazysizes.RelPermalink }}" crossorigin="anonymous"></script> <!-- Preconnect for KaTeX --> {{ if or .Params.katex .Site.Params.katex .Params.math .Site.Params.math }} - <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin> + <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin="anonymous"> {{ end }} @@ -392,7 +396,7 @@ --> {{ range $sameAs }} - <link rel="me" href="{{ . }}"/> + <link rel="me" href="{{ . }}"> {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index c4a803f..33a9c22 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,6 +1,6 @@ -<!-- Site title --> +<!-- Custom or default site title --> {{ if or (templates.Exists "partials/custom/site-title") (templates.Exists "partials/custom/site-title.html") }} - {{ partialCached "custom/site-title" . }} + {{ partial "custom/site-title" . }} {{ else }} <a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a> {{ end }} diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html index 185d769..4810701 100644 --- a/layouts/partials/katex.html +++ b/layouts/partials/katex.html @@ -44,7 +44,6 @@ $el.setAttribute('aria-label', $katexLabel);
})
-
- }
+ }
</script>
diff --git a/layouts/partials/processed-content.html b/layouts/partials/processed-content.html index fbbe353..a19f1e3 100644 --- a/layouts/partials/processed-content.html +++ b/layouts/partials/processed-content.html @@ -40,7 +40,7 @@ {{ end }}
<!--
- This is doing 4 things right now (or is it):
+ This is doing 5 things right now (or is it):
* Adding "tabindex=0" to native table and code fences;
* Making tables scrollable;
|