add rss feed template

315ce614460a8431610417bb5abc2cab53c88a48

Tucker McKnight <tucker.mcknight@gmail.com> | Tue Sep 02 2025

add rss feed template
main.ts:186
Before
185
186
187




188
189
    return new Date(dateString).toDateString()
  })

⁣
⁣
⁣
⁣
  eleventyConfig.addAsyncFilter("getReadMe", async (repoName, branchName) => {
    const location = getLocation(reposConfiguration, branchName, repoName)
    const config = reposConfiguration.repos[repoName]
After
185
186
187
188
189
190
191
192
193
    return new Date(dateString).toDateString()
  })

  eleventyConfig.addFilter("toDateObj", (dateString) => {
    return new Date(dateString)
  })

  eleventyConfig.addAsyncFilter("getReadMe", async (repoName, branchName) => {
    const location = getLocation(reposConfiguration, branchName, repoName)
    const config = reposConfiguration.repos[repoName]
main.ts:381
Before
380
381
382



















      navTab: "patches",
    }
  )
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
}
After
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
      navTab: "patches",
    }
  )

  // FEED.NJK
  const feedTemplate = fsImport.readFileSync(`${__dirname}/templates/feed.njk`).toString()
  eleventyConfig.addTemplate(
    `repos/feed.njk`,
    feedTemplate,
    {
      pagination: {
        data: "branches",
        size: 1,
        alias: "branch",
      },
      permalink: (data) => {
        const repoName = data.branch.repoName
        const branchName = data.branch.branchName
        return `${reposPath}/${eleventyConfig.getFilter("slugify")(repoName)}/branches/${eleventyConfig.getFilter("slugify")(branchName)}/patches.xml`
      },
      eleventyExcludeFromCollections: true,
    }
  )
}