diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js index 1ddb293..274ea01 100644 --- a/assets/css/postcss.config.js +++ b/assets/css/postcss.config.js @@ -1,27 +1,13 @@ const themeDir = __dirname + '/../../'; -const purgecss = require('@fullhuman/postcss-purgecss')({ - // see https://gohugo.io/hugo-pipes/postprocess/#css-purging-with-postcss - content: [ - './hugo_stats.json', - themeDir + '/hugo_stats.json', - 'exampleSite/hugo_stats.json', - ], - defaultExtractor: (content) => { - let els = JSON.parse(content).htmlElements; - return els.tags.concat(els.classes, els.ids); - } -}) - -module.exports = { - plugins: [ - require('postcss-import')({ - path: [themeDir] - }), - require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'), - require('autoprefixer')({ - path: [themeDir] - }), - ...(process.env.HUGO_ENVIRONMENT === 'production' ? [purgecss] : []) - ] -} +module.exports = { + plugins: [ + require("postcss-import")({ + path: [themeDir], + }), + require("tailwindcss")(themeDir + "assets/css/tailwind.config.js"), + require("autoprefixer")({ + path: [themeDir], + }), + ], +}; diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js index f44ad2a..eb55bc1 100644 --- a/assets/css/tailwind.config.js +++ b/assets/css/tailwind.config.js @@ -1,12 +1,19 @@ -const colors = require('tailwindcss/colors') -const { borderColor, fontWeight, fontFamily } = require('tailwindcss/defaultTheme') +const themeDir = __dirname + "/../../"; +const colors = require("tailwindcss/colors"); +const { + borderColor, + fontWeight, + fontFamily, +} = require("tailwindcss/defaultTheme"); module.exports = { content: [ - "./themes/**/layouts/**/*.html", - "./themes/**/assets/js/**/*.js", - "./layouts/**/*.html", - "./assets/js/**/*.js", + themeDir + "layouts/**/*.html", + themeDir + "assets/js/**/*.js", + "layouts/**/*.html", + "assets/js/**/*.js", + "exampleSite/layouts/**/*.html", + "exampleSite/assets/js/**/*.js", ], theme: { extend: { diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index cfb9f87..6d33e7e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@ {{ if or (findRE "