From 34414f9f37a65d79b38b83b527c761dbd4cf7897 Mon Sep 17 00:00:00 2001 From: Rob Henley Date: Thu, 22 Feb 2024 19:05:08 -0600 Subject: [PATCH 1/2] Fixes issue with colors not working correctly (Hugo v0.123.1) --- assets/css/tailwind.config.js | 38 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js index e33c1a97..a27edcec 100644 --- a/assets/css/tailwind.config.js +++ b/assets/css/tailwind.config.js @@ -1,20 +1,18 @@ const themeDir = __dirname + "/../../"; module.exports = { - purge: { - enabled: process.env.HUGO_ENVIRONMENT === "production", - content: [ - themeDir + "layouts/**/*.html", - themeDir + "content/**/*.html", - "layouts/**/*.html", - "config.toml", - "content/**/*.html", - "assets/js/search.js", - "exampleSite/layouts/**/*.html", - "exampleSite/config.toml", - "exampleSite/content/**/*.html", - ], - }, + content: [ + themeDir + "layouts/**/*.html", + themeDir + "content/**/*.html", + "layouts/**/*.html", + "config.toml", + "hugo.toml", + "content/**/*.html", + "assets/js/search.js", + "exampleSite/layouts/**/*.html", + "exampleSite/config.toml", + "exampleSite/content/**/*.html", + ], darkMode: "class", theme: { extend: { @@ -22,14 +20,14 @@ module.exports = { DEFAULT: { css: [ { - 'code::before': { + "code::before": { content: '""', }, - 'code::after': { + "code::after": { content: '""', }, - } - ] + }, + ], }, dark: { css: [ @@ -78,10 +76,10 @@ module.exports = { "a code": { color: theme("colors.white"), }, - 'code::before': { + "code::before": { content: '""', }, - 'code::after': { + "code::after": { content: '""', }, pre: { From 6727a565d18291db8385a910e02d40039d7abff8 Mon Sep 17 00:00:00 2001 From: Rob Henley Date: Thu, 22 Feb 2024 19:07:04 -0600 Subject: [PATCH 2/2] Gets rid of deprecation warning .Site.IsServer INFO deprecated: .Site.IsServer was deprecated in Hugo v0.120.0 --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1b9bc216..6b760c8d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -18,7 +18,7 @@ {{ hugo.Generator }} {{- $styles := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/") -}} - {{- if .Site.IsServer }} + {{- if hugo.IsServer }} {{ else }} {{- $styles := $styles| minify | fingerprint | resources.PostProcess -}}