Skip to content
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.

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

Use Content-Type: application/atom+xml #358

Closed
gsnoff opened this issue Dec 29, 2021 · 3 comments
Closed

Use Content-Type: application/atom+xml #358

gsnoff opened this issue Dec 29, 2021 · 3 comments

Comments

@gsnoff
Copy link

gsnoff commented Dec 29, 2021

Currently the feed generated by this plugin is served with Content-Type: application/xml. Some browsers (Firefox on Debian?) tend to treat such content as arbitrary XML, e.g. showing its internal tree, instead of pretty-printing it with a subscribe option, regardless of whether the content itself is valid Atom content with xmlns set and whatnot.

When the HTTP header is Content-Type: application/atom+xml, the said browsers behave as expected.

@parkr
Copy link
Member

parkr commented Jan 2, 2022

We use mime-db to generate our mime.types file for Jekyll (and GitHub Pages uses the same). It looks like application/atom+xml requires the .atom extension.

You can set this with your feed configuration:

# in config.yml
feed:
  path: /feed.atom

@parkr
Copy link
Member

parkr commented Jan 2, 2022

Unfortunately changing the path globally would cause issues. We could potentially write both paths from now on when config.feed.path is unset and set the rel=alternate to the new .atom path. We can't do 301 redirects (which feed readers generally follow) since GitHub Pages doesn't support redirects. The best bet would be to drop /feed.xml in a major version bump and loudly communicate that this path was being moved. Not sure it's feasible for the benefits here when folks can set config.feed.path to get this functionality today.

@parkr
Copy link
Member

parkr commented Jan 2, 2022

Sent a PR to update the docs examples to use .atom for customizing the feed path: #359

@parkr parkr closed this as completed Jan 3, 2022
@jekyll jekyll locked and limited conversation to collaborators Jan 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants