Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Chucheng <ccwangchn@gmail.com>2020-05-28 03:23:54 +0300
committerWang Chucheng <ccwangchn@gmail.com>2020-05-28 03:23:54 +0300
commit784f79dae720eb4c5e74793a0735a2013fc8a7fd (patch)
tree8fdc4b8dd60686a53e289bae84cfdd93944497cf /assets/css
parent51714dd1ca8d3368d5e24f88e6f37af5df71bf24 (diff)
refactor: change url format from relURL to absURL
Diffstat (limited to 'assets/css')
-rw-r--r--assets/css/postcss.config.js23
-rw-r--r--assets/css/tailwind.config.js11
2 files changed, 11 insertions, 23 deletions
diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js
index af2c238..121ed3f 100644
--- a/assets/css/postcss.config.js
+++ b/assets/css/postcss.config.js
@@ -1,27 +1,5 @@
const themeDir = __dirname + '/../../';
-const purgecss = require('@fullhuman/postcss-purgecss')({
-
- // Specify the paths to all of the template files in your project
- content: [
- themeDir + 'layouts/**/*.html',
- themeDir + 'exampleSite/content/**/*.html',
- 'layouts/**/*.html',
- 'content/**/*.html',
- ],
-
- // This is the function used to extract class names from your templates
- defaultExtractor: content => {
- // Capture as liberally as possible, including things like `h-(screen-1.5)`
- const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []
-
- // Capture classes within other delimiters like .block(class="w-1/2") in Pug
- const innerMatches = content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || []
-
- return broadMatches.concat(innerMatches)
- }
-})
-
module.exports = {
plugins: [
require('postcss-import')({
@@ -31,6 +9,5 @@ module.exports = {
require('autoprefixer')({
path: [themeDir]
}),
- ...(process.env.HUGO_ENVIRONMENT === 'production' ? [purgecss] : [])
]
}
diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js
index 58c9603..af75cf1 100644
--- a/assets/css/tailwind.config.js
+++ b/assets/css/tailwind.config.js
@@ -1,5 +1,16 @@
+const themeDir = __dirname + '/../../';
+
module.exports = {
important: true,
+ purge: {
+ enabled: true,
+ content: [
+ themeDir + 'layouts/**/*.html',
+ themeDir + 'exampleSite/content/**/*.html',
+ 'layouts/**/*.html',
+ 'content/**/*.html',
+ ],
+ },
theme: {
fontFamily: {
'serif': ['Lora', 'Noto Serif SC', 'serif'],