Skip to content

Commit

Permalink
remove failed code
Browse files Browse the repository at this point in the history
  • Loading branch information
supertanuki committed Dec 20, 2024
1 parent a8ef520 commit d06dd9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 0 additions & 24 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,6 @@ module.exports = function (eleventyConfig) {
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-LL-dd')
})

/*
eleventyConfig.addCollection(
'episodesAndNewsletters',
function (collectionApi) {
const items = [
...collectionApi.getFilteredByTag('newsletter'),
...collectionApi.getFilteredByTag('episode'),
]
items.forEach((item) => {
if (!item.templateContent) {
console.warn(`templateContent not ready for ${item.inputPath}`)
}
})
return items.sort((a, b) => {
const dateA = a.data.date || new Date()
const dateB = b.data.date || new Date()
return new Date(dateB) - new Date(dateA)
})
}
)
*/

// Get the first `n` elements of a collection.
eleventyConfig.addFilter('head', (array, n) => {
if (!Array.isArray(array) || array.length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion feed/feed.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ eleventyExcludeFromCollections: true
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in collections.episodesAndNewsletters %}
{%- for post in collections.episode %}
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ post.data.title }}</title>
Expand Down

0 comments on commit d06dd9c

Please sign in to comment.