Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const markdown = require('metalsmith-markdown')
const prism = require('metalsmith-prism')
const permalinks = require('metalsmith-permalinks')
const pagination = require('metalsmith-yearly-pagination')
const htmlMinifier = require('metalsmith-html-minifier')
const defaultsDeep = require('lodash.defaultsdeep')
const autoprefixer = require('autoprefixer')
const marked = require('marked')
Expand Down Expand Up @@ -47,33 +46,6 @@ const markedOptions = {
renderer
}

const htmlMinifierOpts = {
collapseBooleanAttributes: true,
collapseWhitespace: true,
conservativeCollapse: true, // This is needed as things are now
decodeEntities: true,
minifyCSS: {
level: {
1: {
specialComments: 0
}
}
},
minifyJS: false, // we don't have a lot inline JS and this slows down things
minifyURLs: false,
processConditionalComments: true,
removeAttributeQuotes: true,
removeComments: true,
removeOptionalAttributes: true,
removeOptionalTags: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
removeTagWhitespace: false,
sortAttributes: true,
sortClassName: true
}

// This function imports a given language file and uses the default language set
// in DEFAULT_LANG as a fallback to prevent any strings that aren't filled out
// from appearing as blank.
Expand Down Expand Up @@ -207,8 +179,6 @@ function buildLocale (source, locale, opts) {
pattern: /\.js$/
}))
.use(layouts())
// Use the default options
.use(process.env.NODE_ENV !== 'development' ? htmlMinifier({ minifierOptions: htmlMinifierOpts }) : '')
// Pipes the generated files into their respective subdirectory in the build
// directory.
.destination(path.join(__dirname, 'build', locale))
Expand Down
108 changes: 5 additions & 103 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"metalsmith-discover-helpers": "^0.1.1",
"metalsmith-discover-partials": "^0.1.2",
"metalsmith-feed": "^1.0.0",
"metalsmith-html-minifier": "^4.0.0",
"metalsmith-layouts": "^2.3.1",
"metalsmith-markdown": "^1.3.0",
"metalsmith-metadata": "0.0.4",
Expand Down