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

github.com/opera7133/Blonde.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authoropera7133 <ainznino@pm.me>2021-01-16 07:28:26 +0300
committeropera7133 <ainznino@pm.me>2021-01-16 07:28:26 +0300
commite3bb0d5f0b6477c3422b4e395b2675c3b2d4412d (patch)
tree5d211afdaac8b8c9571e710e23135e6f7816d1f2 /assets
parentd71374b354638c9c5dd37eea3894af33a86da116 (diff)
New TailwindCSS
Diffstat (limited to 'assets')
-rw-r--r--assets/css/postcss.config.js27
-rw-r--r--assets/css/tailwind.config.js4
2 files changed, 11 insertions, 20 deletions
diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js
index 30ce7b0..1e790fc 100644
--- a/assets/css/postcss.config.js
+++ b/assets/css/postcss.config.js
@@ -1,26 +1,15 @@
const themeDir = __dirname + '/../../';
const purgecss = require('@fullhuman/postcss-purgecss')({
-
- // Specify the paths to all of the template files in your project
+ // see https://gohugo.io/hugo-pipes/postprocess/#css-purging-with-postcss
content: [
- themeDir + 'layouts/**/*.html',
- themeDir + 'content/**/*.html',
- 'layouts/**/*.html',
- 'content/**/*.html',
- 'exampleSite/layouts/**/*.html',
- 'exampleSite/content/**/*.html',
+ './hugo_stats.json',
+ themeDir + '/hugo_stats.json',
+ 'exampleSite/hugo_stats.json',
],
-
- // 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)
+ defaultExtractor: (content) => {
+ let els = JSON.parse(content).htmlElements;
+ return els.tags.concat(els.classes, els.ids);
}
})
@@ -35,4 +24,4 @@ module.exports = {
}),
...(process.env.HUGO_ENVIRONMENT === 'production' ? [purgecss] : [])
]
-}
+} \ No newline at end of file
diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js
index dd6532c..5a6f2b9 100644
--- a/assets/css/tailwind.config.js
+++ b/assets/css/tailwind.config.js
@@ -3,5 +3,7 @@ module.exports = {
extend: {}
},
variants: {},
- plugins: []
+ plugins: [
+ require('@tailwindcss/typography'),
+ ]
}