Skip to content

Commit

Permalink
Fixed missing CSS by adding purgecss config
Browse files Browse the repository at this point in the history
  • Loading branch information
stedman committed Nov 13, 2022
1 parent ecf3013 commit 4e28b05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint:js": "eslint --fix .eleventy.js ./_includes/*.js",
"lint:md": "markdownlint --fix ./_posts/*.md ./_meetups/*.md",
"lint": "npm run lint:js && npm run lint:md",
"purgecss": "npx purgecss --css _site/assets/css/main.css --content _site/index.html,_site/about/index.html,_site/contributing/index.html,_site/posts/meetups/index.html,_site/posts/meetups/2020/**/*.html --output _site/assets/css/main.css",
"purgecss": "npx purgecss --config ./purgecss.config.js",
"start": "ELEVENTY_ENV=dev eleventy --serve --watch",
"test": "npm run lint"
},
Expand Down
13 changes: 13 additions & 0 deletions purgecss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
css: ['_site/assets/css/main.css'],
content: [
'_site/index.html',
'_site/about/index.html',
'_site/code-of-conduct/index.html',
'_site/contributing/index.html',
'_site/posts/index.html',
'_site/posts/meetups/index.html',
'_site/posts/meetups/2020/**/*.html',
],
output: '_site/assets/css/main.css',
};

0 comments on commit 4e28b05

Please sign in to comment.