chore: 11ty img

This commit is contained in:
Cory Dransfeldt 2024-06-06 14:55:19 -07:00
parent 2bcd6d3ee7
commit 73eb06739e
No known key found for this signature in database
23 changed files with 728 additions and 270 deletions

View file

@ -1,6 +1,7 @@
import syntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight'
import tablerIcons from '@cdransf/eleventy-plugin-tabler-icons'
import lightningCSS from '@11tyrocks/eleventy-plugin-lightningcss'
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
import markdownIt from 'markdown-it'
import markdownItAnchor from 'markdown-it-anchor'
import markdownItFootnote from 'markdown-it-footnote'
@ -23,6 +24,14 @@ export default async function (eleventyConfig) {
eleventyConfig.addPlugin(syntaxHighlight)
eleventyConfig.addPlugin(tablerIcons)
eleventyConfig.addPlugin(lightningCSS)
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: 'html',
formats: ['webp', 'jpeg'],
defaultAttributes: {
loading: 'lazy',
decoding: 'async',
},
});
// quiet build output
eleventyConfig.setQuietMode(true)
@ -35,6 +44,7 @@ export default async function (eleventyConfig) {
// passthrough
eleventyConfig.addPassthroughCopy('src/assets')
eleventyConfig.addPassthroughCopy('_redirects')
eleventyConfig.addPassthroughCopy('_headers')
eleventyConfig.addPassthroughCopy({
'node_modules/minisearch/dist/umd/index.js': 'assets/scripts/components/minisearch.js',
})