8000 Automatically set link to RSS or ATOM feed by heitorPB · Pull Request #35 · pawroman/zola-theme-terminimal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Automatically set link to RSS or ATOM feed #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

< 8000 div class="d-flex flex-items-center"> Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

heitorPB
Copy link
Contributor
@heitorPB heitorPB commented May 4, 2023

When generating the HTML for the feed, set the <link > type to either application/rss+xml or application/atom+xml according to the feed_filename from config.toml. Currently, the theme assumes the user uses RSS, without an option to change to ATOM.

I don't think this is the "bestest" approach, but I prefer guessing default feed filenames than adding another configuration option. Unless I am missing something, which is totally possible. Suggestions are very welcome.

@pawroman should I also add a note in the README.md about this?

Based on the Zola docs for feeds.

Closes #48

Set the <link > type to either `application/rss+xml` or
`application/atom+xml` according to the `feed_filename` from
`config.toml`.
@heitorPB heitorPB mentioned this pull request Jun 20, 2023
@pawroman
Copy link
Owner
pawroman commented Jun 21, 2023

Hey, thanks for the contribution, much appreciated, and sorry it took so long for me to respond.

I think it makes sense to lean onto the Zola defaults and to also support both feed formats. I only used RSS because I didn't know any better 😅

@pawroman should I also add a note in the README.md about this?

If you want, please go ahead. Personally, I would primarily consider adding it to config.toml, e.g.

# The theme supports feeds
generate_feed = false

# use `atom.xml` (default) for atom feeds, or `rss.xml` for RSS
feed_filename = "atom.xml"

@heitorPB
Copy link
Contributor Author

Hey, no need to apologize :)

Hmm, I think we are talking about the same thing? This PR proposes to use config.feed_filename to generate the link to the feed, instead of hardcoding to rss.xml. I also added some trickery to find out the application/type of the feed (RSS or ATOM).

I think my initial words on this PR were not ideal to clearly state what was going on.

I have this branch working "live" on my site if you want to see the result there (https://heitorpb.github.io/).

@pawroman
Copy link
Owner

Hey, yeah, your changes are definitely OK, and you made it all clear.

I just wanted the theme config.toml file to mention that we support both feed types, officially. In my mind, it's good to have a good reference to the supported features in the config example.

@heitorPB
Copy link
Contributor Author

Ah, got it! And I totally agree with you :)

If there's something else you want me to address here, I'll be happy to do it.

@pawroman
Copy link
Owner

Good stuff, thanks!

@pawroman pawroman merged commit 6e91e64 into pawroman:master Jun 23, 2023
@heitorPB heitorPB deleted the autoconfigure-feed-type branch April 3, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ATOM feeds
2 participants
0