@@ -3,19 +3,31 @@ const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
33const pluginTOC = require ( 'eleventy-plugin-toc' ) ;
44const markdownIt = require ( 'markdown-it' ) ;
55const markdownItAnchor = require ( 'markdown-it-anchor' ) ;
6+ const sitemap = require ( "@quasibit/eleventy-plugin-sitemap" ) ;
67
78module . exports = function ( eleventyConfig ) {
89
910 eleventyConfig . addPlugin ( syntaxHighlight ) ;
1011
12+ // Add the sitemap plugin with image grabbing enabled
13+ eleventyConfig . addPlugin ( sitemap , {
14+ sitemap : {
15+ hostname : "https://aryan-gupta.is-a.dev" ,
16+ } ,
17+ images : {
18+ grab : true ,
19+ featuredImage : "image"
20+ }
21+ } ) ;
22+
1123 eleventyConfig . setLibrary (
1224 'md' ,
1325 markdownIt ( {
1426 html : true ,
1527 linkify : true ,
1628 typographer : true ,
1729 } ) . use ( markdownItAnchor , {
18- slugify : s => s . trim ( ) . toLowerCase ( ) . replace ( / [ \s + , . ' ] / g, '-' ) . replace ( / [ ( ) ] / g, '' ) , // Ensure consistent slugification
30+ slugify : s => s . trim ( ) . toLowerCase ( ) . replace ( / [ \s + , . ' ] / g, '-' ) . replace ( / [ ( ) ] / g, '' ) ,
1931 permalink : markdownItAnchor . permalink . ariaHidden ( {
2032 placement : 'before' ,
2133 class : 'heading-anchor-link' ,
@@ -42,10 +54,9 @@ module.exports = function(eleventyConfig) {
4254 eleventyConfig . addPassthroughCopy ( "src/images" ) ;
4355 eleventyConfig . addPassthroughCopy ( "src/favicon-32x32.png" ) ;
4456 eleventyConfig . addPassthroughCopy ( "robots.txt" ) ;
45- eleventyConfig . addPassthroughCopy ( " sitemap.xml" ) ;
57+ // The sitemap.xml passthrough has been removed
4658
4759 eleventyConfig . addFilter ( "readableDate" , ( dateObj , format = "DD" ) => {
48-
4960 return DateTime . fromJSDate ( dateObj , { zone : 'utc' } ) . toFormat ( format ) ;
5061 } ) ;
5162
0 commit comments