Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/athul/archie.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Gergely <aron.gergely@rasterra.nl>2021-06-08 22:57:36 +0300
committerAthul Cyriac Ajay <athul8720@gmail.com>2021-06-09 11:34:21 +0300
commitdd1612c482e9fd993efe41f2783bbabed9b1e4cc (patch)
tree3b42468c6102536de412fd0e234c411f77dd9379 /layouts
parent27307e797f86cbf40f9d8a62fc4274dad0440df7 (diff)
cache busting for custom CSS, update readme
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/header.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 8914b7d..c5ae589 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -19,7 +19,7 @@
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
-
+
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if and (isset .Site.Params "social") (.Site.Params.useCDN | default false) -}}
@@ -35,16 +35,20 @@
{{ $fontstyle := resources.Get "css/fonts.css" | fingerprint }}
<link href="{{ $fontstyle.Permalink }}" rel="stylesheet">
{{ end }}
+
{{ $style := resources.Get "css/main.css" | fingerprint }}
<link rel="stylesheet" type="text/css" media="screen" href="{{ $style.Permalink }}" />
+
{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}}
{{ $darkstyle := resources.Get "css/dark.css" | fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $darkstyle.Permalink }}" {{ if eq .Site.Params.mode "auto" }}media="(prefers-color-scheme: dark)"{{ end }} />
{{ end }}
+
<!-- Custom CSS style get applied last -->
{{- if isset .Site.Params "customcss" }}
{{ range .Site.Params.customCSS }}
- <link rel="stylesheet" type="text/css" href="{{ . | relURL }}">
+ {{ $customstyle := resources.Get . | fingerprint }}
+ <link rel="stylesheet" type="text/css" href="{{ $customstyle.Permalink }}">
{{ end }}
{{- end -}}
{{- range .Site.Params.customJS }}