Adding Skeleventy-based site sources.
This commit is contained in:
parent
ac7f2e6002
commit
28a89401ff
79 changed files with 2183 additions and 0 deletions
13
sources/utilities/transforms/htmlminify.js
Normal file
13
sources/utilities/transforms/htmlminify.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const htmlmin = require('html-minifier')
|
||||
|
||||
module.exports = (content, outputPath = '.html') => {
|
||||
|
||||
if ( !String(outputPath).endsWith('.html') ) return content;
|
||||
|
||||
return htmlmin.minify(content, {
|
||||
useShortDoctype: true,
|
||||
removeComments: true,
|
||||
collapseWhitespace: true
|
||||
})
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue