chore: debug

This commit is contained in:
Cory Dransfeldt 2024-06-10 09:25:41 -07:00
parent e299fb2ec4
commit 909008d068
No known key found for this signature in database

View file

@ -4,7 +4,6 @@ import lightningCSS from '@11tyrocks/eleventy-plugin-lightningcss'
import markdownIt from 'markdown-it'
import markdownItAnchor from 'markdown-it-anchor'
import markdownItFootnote from 'markdown-it-footnote'
import htmlmin from 'html-minifier-terser'
import filters from './config/filters/index.js'
import { minifyJsComponents } from './config/events/index.js'
import { allContent, popularPosts, searchIndex } from './config/collections/index.js'
@ -84,29 +83,6 @@ export default async function (eleventyConfig) {
eleventyConfig.addShortcode('appVersion', () => appVersion)
eleventyConfig.addShortcode('currentYear', () => DateTime.now().year)
// transforms
eleventyConfig.addTransform('html-minify', (content, path) => {
if (path && path.endsWith('.html')) {
return htmlmin.minify(content, {
collapseBooleanAttributes: true,
collapseWhitespace: true,
decodeEntities: true,
includeAutoGeneratedTags: false,
minifyCSS: true,
minifyJS: true,
minifyURLs: true,
noNewlinesBeforeTagClose: true,
quoteCharacter: '"',
removeComments: true,
sortAttributes: true,
sortClassName: true,
useShortDoctype: true,
processScripts: ['application/ld+json'], // minify JSON-LD scripts
})
}
return content
})
// events
eleventyConfig.on('afterBuild', minifyJsComponents)