rochacbruno / marmite

Markdown makes sites - A Static Site Generator for Blogs
https://rochacbruno.github.io/marmite/
GNU Affero General Public License v3.0
340 stars 19 forks source link

[feat] Feeds (ActivityPub) #8

Open rochacbruno opened 2 weeks ago

rochacbruno commented 2 weeks ago

Feeds must be generated

It is important to render the JSON feed so we can integrate with Hatsu https://hatsu.cli.rs/

rochacbruno commented 1 week ago

It must be possible to configure filters for rss feeds,

The specific layout of this config can be adjusted, jsut a suggestion.

On marmite.yaml

feeds:
  filters:  # filter out of the feeds content if matches
    tags: til, news    # will not show on /feed.rss but will still be on /tag/til.rss

Optionally, a regexp pattern can be used,

feeds:
  filters:
    tags: "regex(\bpy\w*\b)"  # will filter out any of `py, python, pythonic`
    title: "regex((?i)diary)"  # will filter out any content where title contains `diary`
zokaibr commented 1 week ago

Facing greater challenges. I want to try this one = )

I'm very new on ActivityPub concepts, I know a little bit about Fediverse and ActivityPub is behind the scenes but I need to deep dive on it. As we do not have a server involved on it, I have a raw idea to use the building process to send notifications.

What about focus on RSS and JSON file generation on this issue and create a discussion (or another issue) for ActivityPub?

rochacbruno commented 1 week ago

Sure @zokaibr this issue is to focus on generating the RSS and JSON feed files only!

/feed.rss
/feed.json
/tag/foo.rss
/tag/foo.json

And consider the filters.

For ACtibityPub we don't really need to implement anything, the running instance of Hatsu will fetch the JSON feed and do the rest. https://hatsu.cli.rs/users/feed.html

rochacbruno commented 1 week ago

Just for context the inspiration for the filtering thing came from https://social.jvns.ca/@b0rk/113351904842806990

we can do first the complete feed generation and implement the filtering later

rochacbruno commented 1 week ago

The JSON feed specs https://www.jsonfeed.org/version/1.1/

zokaibr commented 1 week ago

Great! Thank for all your inputs!

I'll split it in more than one PR.

rochacbruno commented 2 days ago

@zokaibr I think we dont need the tag filters if we later implement #101

So this issue is only about rendering index.rss and tag-{name}.rss (+ each JSON files)

zokaibr commented 2 days ago

@rochacbruno If I understood well about streams, it will prevent a content to be listed on index.html (and as consequence to be listed on feed.rss) and will be listed on another page. But I have concern about a user needing to have posts with a given tag listed on the front-page and opting out to render this tag from the feed.

For example, I have a TIL tag and I want its posts listed on my front-page but I also want this tag out of my main rss feed. This filter you proposed would be helpful even with streams.

I mean, it does not need to be our main concern by now, maybe we can open a new issue to handle this. I think these filters are a great feature to have.