chore: cleanup
This commit is contained in:
parent
f02ac8ce6c
commit
a8e9076660
1 changed files with 1 additions and 10 deletions
11
.eleventy.js
11
.eleventy.js
|
@ -25,18 +25,12 @@ export default async function (eleventyConfig) {
|
||||||
eleventyConfig.addPlugin(tablerIcons)
|
eleventyConfig.addPlugin(tablerIcons)
|
||||||
if (process.env.ELEVENTY_PRODUCTION) eleventyConfig.addPlugin(cssConfig)
|
if (process.env.ELEVENTY_PRODUCTION) eleventyConfig.addPlugin(cssConfig)
|
||||||
|
|
||||||
// quiet build output
|
|
||||||
eleventyConfig.setQuietMode(true)
|
eleventyConfig.setQuietMode(true)
|
||||||
|
|
||||||
// allow missing extensions
|
|
||||||
eleventyConfig.configureErrorReporting({ allowMissingExtensions: true })
|
eleventyConfig.configureErrorReporting({ allowMissingExtensions: true })
|
||||||
|
|
||||||
// template options
|
|
||||||
eleventyConfig.setLiquidOptions({
|
eleventyConfig.setLiquidOptions({
|
||||||
jsTruthy: true,
|
jsTruthy: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// passthrough
|
|
||||||
eleventyConfig.addPassthroughCopy('src/assets')
|
eleventyConfig.addPassthroughCopy('src/assets')
|
||||||
eleventyConfig.addPassthroughCopy('_redirects')
|
eleventyConfig.addPassthroughCopy('_redirects')
|
||||||
eleventyConfig.addPassthroughCopy('_headers')
|
eleventyConfig.addPassthroughCopy('_headers')
|
||||||
|
@ -56,7 +50,6 @@ export default async function (eleventyConfig) {
|
||||||
'node_modules/youtube-video-element/youtube-video-element.js': 'assets/scripts/components/youtube-video-element.js'
|
'node_modules/youtube-video-element/youtube-video-element.js': 'assets/scripts/components/youtube-video-element.js'
|
||||||
})
|
})
|
||||||
|
|
||||||
// collections
|
|
||||||
eleventyConfig.addCollection('allContent', (collection) => {
|
eleventyConfig.addCollection('allContent', (collection) => {
|
||||||
const { allContent } = processContent(collection)
|
const { allContent } = processContent(collection)
|
||||||
return allContent
|
return allContent
|
||||||
|
@ -82,7 +75,6 @@ export default async function (eleventyConfig) {
|
||||||
md.use(markdownItPrism)
|
md.use(markdownItPrism)
|
||||||
eleventyConfig.setLibrary('md', md)
|
eleventyConfig.setLibrary('md', md)
|
||||||
|
|
||||||
// filters
|
|
||||||
eleventyConfig.addLiquidFilter('markdown', (content) => {
|
eleventyConfig.addLiquidFilter('markdown', (content) => {
|
||||||
if (!content) return
|
if (!content) return
|
||||||
return md.render(content)
|
return md.render(content)
|
||||||
|
@ -92,7 +84,6 @@ export default async function (eleventyConfig) {
|
||||||
eleventyConfig.addLiquidFilter(filterName, filters[filterName])
|
eleventyConfig.addLiquidFilter(filterName, filters[filterName])
|
||||||
})
|
})
|
||||||
|
|
||||||
// shortcodes
|
|
||||||
eleventyConfig.addShortcode('appVersion', () => appVersion)
|
eleventyConfig.addShortcode('appVersion', () => appVersion)
|
||||||
eleventyConfig.addShortcode('currentYear', () => DateTime.now().year)
|
eleventyConfig.addShortcode('currentYear', () => DateTime.now().year)
|
||||||
|
|
||||||
|
@ -117,7 +108,7 @@ export default async function (eleventyConfig) {
|
||||||
sortAttributes: true,
|
sortAttributes: true,
|
||||||
sortClassName: true,
|
sortClassName: true,
|
||||||
useShortDoctype: true,
|
useShortDoctype: true,
|
||||||
processScripts: ['application/ld+json'], // minify JSON-LD scripts
|
processScripts: ['application/ld+json'],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return content
|
return content
|
||||||
|
|
Reference in a new issue