|
|
@ -46,12 +46,12 @@ class Engine {
|
|
|
|
}, true)
|
|
|
|
}, true)
|
|
|
|
|
|
|
|
|
|
|
|
// adding defaults for view, data from site.yml, functions and pageQuery
|
|
|
|
// adding defaults for view, data from site.yml, functions and pageQuery
|
|
|
|
this._defaults = {
|
|
|
|
this._defaults = assign(this._options.defaults, {
|
|
|
|
site: site,
|
|
|
|
site: site,
|
|
|
|
asset: asset,
|
|
|
|
asset: asset,
|
|
|
|
dayjs: dayjs,
|
|
|
|
dayjs: dayjs,
|
|
|
|
pageQuery: new PageQuery(configStore.get('source'))
|
|
|
|
pageQuery: new PageQuery(configStore.get('source'))
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -77,7 +77,7 @@ class Engine {
|
|
|
|
const options = configStore.get('options')
|
|
|
|
const options = configStore.get('options')
|
|
|
|
|
|
|
|
|
|
|
|
// if options minifyHtml is set, minify html, but only if page has type html
|
|
|
|
// if options minifyHtml is set, minify html, but only if page has type html
|
|
|
|
if (options.minifyHtml === true && data.page.type === 'html') {
|
|
|
|
if (options.minifyHtml === true && data.page.extensions === 'html') {
|
|
|
|
response = minify(response, {
|
|
|
|
response = minify(response, {
|
|
|
|
removeComments: true,
|
|
|
|
removeComments: true,
|
|
|
|
collapseWhitespace: true,
|
|
|
|
collapseWhitespace: true,
|
|
|
@ -96,4 +96,4 @@ class Engine {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = Engine
|
|
|
|
module.exports = Engine
|
|
|
|