feat: per-folder RSS feeds, cont'd
Follow-up on #529 and accidental #865. @aarnphm
Suggestions added. I'm upset that the idiomatic way to concatenate in-place is to expand the second array in a push call, but that can't be helped.
I think the lint config is broken, it's wanting to add trailing commas to arguments of single-argument functions.
we should generate an RSS feed per directory UNLESS that directory has an
index.mdto hasnoFeed: truein the frontmatter
I worry about build times, doing this recursively could get clunky for large gardens. The main reason I wanted to retain the initial functionality and then opt-in to my new feature is because the current type is what's expected from effectively any other RSS integration on any site/SSG. We also don't have the dynamicity to do caching like Mastodon does for their per-tag and per-user feeds. Can maybe add a plugin option for this behavior? global-recursive: "disabled" | "directories" | "content" | "all" that ignores includeDirectories and instead watches excludeDirectories when set?
I definitely think just adding .xml to the link to the folder/file you're watching would be really cool UX but I only see it on projects that require webservers for a reason.
imo, we should do content-level config within frontmatter wherever possible but I'm curious but what you think here
Can absolutely add this! Would an rss: true in frontmatter work? Then I just filter the root contentindex with that
i think it shouldn't be too chunky, the processing for rss feeds is really light compared to what the rest of Quartz does so it would be dominated by the disk write speed (i.e. Hugo has this behaviour)
we can also reuse nestings, e.g. if we have
[content]
- a
- b
- c
- d
- e
- f
the rss feed for content would just be the feed of a + d
Reuse is fascinating because that basically just needs a DFS for generation then. Can I safely do recursion here?
you could use memoization here for the mapping of directory to rss feed and only compute if it hasnt already been computed (i think we shouldnt need recursion here)
Ooh, any resources on that? I'll add it when I get time.