Add Rehype Plugin to lazy images

This commit is contained in:
prototypa
2024-04-02 14:05:16 -04:00
parent 27436c10ca
commit 05412477c7
4 changed files with 164 additions and 694 deletions

View File

@@ -12,7 +12,7 @@ import compress from 'astro-compress';
import astrowind from './src/integration';
import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin } from './src/utils/frontmatter.mjs';
import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin, lazyImagesRehypePlugin } from './src/utils/frontmatter.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -78,7 +78,7 @@ export default defineConfig({
markdown: {
remarkPlugins: [readingTimeRemarkPlugin],
rehypePlugins: [responsiveTablesRehypePlugin],
rehypePlugins: [responsiveTablesRehypePlugin, lazyImagesRehypePlugin],
},
vite: {