aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/config/postcss.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'code/frontpage/config/postcss.config.js')
-rw-r--r--code/frontpage/config/postcss.config.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/code/frontpage/config/postcss.config.js b/code/frontpage/config/postcss.config.js
new file mode 100644
index 0000000..3e0eff8
--- /dev/null
+++ b/code/frontpage/config/postcss.config.js
@@ -0,0 +1,44 @@
+const autoprefixer = require('autoprefixer');
+const purgecss = require('@fullhuman/postcss-purgecss');
+const whitelister = require('purgecss-whitelister');
+
+module.exports = {
+ plugins: [
+ autoprefixer(),
+ purgecss({
+ content: [
+ './layouts/**/*.html',
+ './content/**/*.md',
+ ],
+ safelist: [
+ 'lazyloaded',
+ 'table',
+ 'thead',
+ 'tbody',
+ 'tr',
+ 'th',
+ 'td',
+ 'h5',
+ 'alert-link',
+ 'container-xxl',
+ 'container-fluid',
+ 'offcanvas-backdrop',
+ 'img-fluid',
+ 'lazyload',
+ 'blur-up',
+ 'figcaption',
+ ...whitelister([
+ './assets/scss/components/_alerts.scss',
+ './assets/scss/components/_buttons.scss',
+ './assets/scss/components/_code.scss',
+ './assets/scss/components/_diagrams.scss',
+ './assets/scss/components/_syntax.scss',
+ './assets/scss/components/_search.scss',
+ './assets/scss/common/_dark.scss',
+ './node_modules/bootstrap/scss/_dropdown.scss',
+ './node_modules/katex/dist/katex.css',
+ ]),
+ ],
+ }),
+ ],
+}