init
This commit is contained in:
35
postcss.config.js
Normal file
35
postcss.config.js
Normal file
@@ -0,0 +1,35 @@
|
||||
const purgecss = require("@fullhuman/postcss-purgecss")({
|
||||
content: ["./hugo_stats.json"],
|
||||
defaultExtractor: (content) => {
|
||||
const els = JSON.parse(content).htmlElements;
|
||||
return [...(els.tags || []), ...(els.classes || []), ...(els.ids || [])];
|
||||
},
|
||||
safelist: [
|
||||
/dark/,
|
||||
/^swiper-/,
|
||||
/collapsing/,
|
||||
/show/,
|
||||
/[aria-expanded=true]/,
|
||||
/[aria-expanded=false]/,
|
||||
/^lb-/,
|
||||
/^gl/,
|
||||
/^go/,
|
||||
/^gc/,
|
||||
/^gs/,
|
||||
/^gi/,
|
||||
/^desc/,
|
||||
/^zoom/,
|
||||
/dragging/,
|
||||
/fullscreen/,
|
||||
/loaded/,
|
||||
/visible/,
|
||||
/current/,
|
||||
/active/,
|
||||
],
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
...(process.env.HUGO_ENVIRONMENT === "production" ? [purgecss] : []),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user