From 525bcfcd212d164bdc9cd5734a95279485c38016 Mon Sep 17 00:00:00 2001 From: Francis Barton Date: Sun, 4 Oct 2020 17:11:49 +0100 Subject: [PATCH] Add custom CSS option - fixes issue #14 Borrowed some code from https://github.com/gadenbuie/garrickadenbuie-com/blob/main/layouts/partials/head.html and blended it in. I hope the syntax is still valid and makes sense. I'm not sure if it ought to say `if isset .Site.Params "customCSS"` but I left it as `customcss` as you suggested. --- layouts/partials/header.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 2034c03..d16fe3c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -43,6 +43,12 @@ {{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}} + {{ end }} + + {{- if isset .Site.Params "customcss" }} + {{ range .Site.Params.customCSS }} + + {{ end }} {{- end -}} {{- range .Site.Params.customJS }} {{- if or (hasPrefix . "http://") (hasPrefix . "https://") }} @@ -51,4 +57,4 @@ {{- end }} {{- end }} - \ No newline at end of file +