@@ -53,6 +53,9 @@ module.exports = (eleventyConfig) => {
5353 return addFileDates ( posts ) ;
5454 } ) ;
5555
56+ // FILTER: Convert page.date directly to 'YYYY/MM/DD' slug.
57+ eleventyConfig . addLiquidFilter ( 'dateSlug' , filter . dateSlug ) ;
58+
5659 // FILTER: Reverse array without mutating original.
5760 eleventyConfig . addFilter ( 'flip' , filter . flip ) ;
5861
@@ -80,6 +83,9 @@ module.exports = (eleventyConfig) => {
8083 // PLUGIN: RSS feed
8184 eleventyConfig . addPlugin ( pluginRss ) ;
8285
86+ // FILTER: Atom date format
87+ eleventyConfig . addLiquidFilter ( "dateToRfc3339" , pluginRss . dateToRfc3339 ) ;
88+
8389 // TRANSFORM: minify HTML
8490 eleventyConfig . addTransform ( 'htmlmin' , ( content , outputPath ) => {
8591 if ( typeof outputPath === 'string' && outputPath . endsWith ( '.html' ) ) {
@@ -102,10 +108,10 @@ module.exports = (eleventyConfig) => {
102108 callbacks : {
103109 ready ( err , bs ) {
104110 bs . addMiddleware ( '*' , ( req , res ) => {
105- const content_404 = fs . readFileSync ( '_site/404.html' ) ;
111+ const content404 = fs . readFileSync ( '_site/404.html' ) ;
106112 // Provides the 404 content without redirect.
107113
108- res . write ( content_404 ) ;
114+ res . write ( content404 ) ;
109115 // Add 404 http status code in request header.
110116 // res.writeHead(404, { "Content-Type": "text/html" });
111117 res . writeHead ( 404 ) ;
0 commit comments