feat: link post support + style fixes + split post and link feeds
This commit is contained in:
parent
591269ae92
commit
21ab946b74
22 changed files with 113 additions and 99 deletions
19
.eleventy.js
19
.eleventy.js
|
@ -80,6 +80,25 @@ module.exports = function (eleventyConfig) {
|
|||
return Array.from(tagsSet).sort()
|
||||
})
|
||||
|
||||
eleventyConfig.addCollection('links', (collection) => {
|
||||
const links = []
|
||||
collection.getAll().forEach((item) => {
|
||||
if (item.data.collections.posts) {
|
||||
item.data.collections.posts.forEach((post) => {
|
||||
const url = post.data.link
|
||||
if (url?.includes('http') && !links.find((link) => link.title === post.data.title))
|
||||
links.push({
|
||||
url: post.data.link,
|
||||
title: post.data.title,
|
||||
date: post.data.date,
|
||||
description: post.data.post_excerpt,
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return links
|
||||
})
|
||||
|
||||
eleventyConfig.addCollection('tagMap', (collection) => {
|
||||
const tags = {}
|
||||
collection.getAll().forEach((item) => {
|
||||
|
|
Reference in a new issue