From f00b90be7841fe446322672a6cde618b523c197e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 8 Nov 2020 22:36:04 +0100 Subject: [PATCH] load static css/js assets from data template --- CHANGELOG.md | 5 +++++ data/assets.json | 8 ++++++++ layouts/partials/foot.html | 2 +- layouts/partials/head/others.html | 16 ++++++++-------- layouts/shortcodes/mermaid.html | 2 +- 5 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 data/assets.json diff --git a/CHANGELOG.md b/CHANGELOG.md index de86c37..6e156d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ - remove `title` and set empty `alt` tag on branding image - add minimal working CSS for printing - split out mobile CSS + - load static css/js assets from data template: + This way users can hash static assets and overwrite the data template + to deliver the hashed assets. Thats helpful if you have to deal with + long cache settings but wont to ensure your updated assets are delivered + to clients. - BUGFIX - use relative URL's for fonts - INTERNAL diff --git a/data/assets.json b/data/assets.json new file mode 100644 index 0000000..20a527d --- /dev/null +++ b/data/assets.json @@ -0,0 +1,8 @@ +{ + "main.min.css": "main.min.css", + "mobile.min.css": "mobile.min.css", + "print.min.css": "print.min.css", + "custom.css": "custom.css", + "js/clipboard.min.js": "js/clipboard.min.js", + "js/mermaid.min.js": "js/mermaid.min.js" +} diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html index 79349b8..db37bb0 100644 --- a/layouts/partials/foot.html +++ b/layouts/partials/foot.html @@ -1,5 +1,5 @@ {{ if default true .Site.Params.GeekblogAnchorCopy }} - + +