Skip to content

Conversation

@benbalter
Copy link
Contributor

This pull request updates /feed.xml to serve Atom, rather than RSS, per the discussion over in #2.

The pull request also updates the documentation, continuing to use the term RSS at times, because as @pathawks noted, although not technically accurate, it is often used a generic term to describe blog feeds. ✨ SEO ✨

The Atom feed validates against W3 with no warnings.

I also wanted to call out a few optional, common site-level and post-level configuration variables, which are baked into the template:

Optional configuration options

The plugin will automatically use any of the following configuration variables, if they are present in your site's _config.yml file.

  • name - The title of the site, e.g., "My awesome site"
  • description - A longer description of what your site is about, e.g., "Where I blog about Jekyll and other awesome things"
  • url - The URL to your site, e.g., http://example.com. If none is provided, the plugin will try to use site.github.url.
  • author - Your name, e.g., "Dr. Jekyll"

Optional front matter

The plugin will use the following post metadata, automatically generated by Jekyll, which you can override via a post's YAML front matter:

  • date
  • title
  • excerpt
  • id
  • category
  • tags

Additionally, the plugin will use the following values, if present in a post's YAML front matter:

  • author - The author of the post, e.g., "Dr. Jekyll". If none is given, feed readers will look to the feed author as defined in _config.yml

Fixes #2.

@benbalter benbalter self-assigned this May 14, 2015
@benbalter benbalter added this to the 0.1.0 milestone May 14, 2015
@XhmikosR
Copy link
Contributor

So, do you plan to rename the plugin to jekyll-atom-feed too?

I still believe offering the 2 is the best solution for Jekyll users.

@benbalter
Copy link
Contributor Author

So, do you plan to rename the plugin to jekyll-atom-feed too?

Opened #27 to discuss.

lib/feed.xml Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the slash after {{ url_base }} necessary?

lib/feed.xml Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

post.excerpt should be escaped.

Per Atom spec, all text should be escaped.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be awesome if Jekyll had one official way of organizing your settings because I think most people fill out their _config.yml with very different ways of handling it. I have a author block that contains my name, email, twitter and so on that you can use via {% site.author.name %} while others use collections for authors and so on. I think we'd benefit from having one central way of doing this so it'd be easier for plugins to have values in common.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sondr3 Great call. I'd love to get there eventually (with the simple fallback), but it was a bit more than I wanted to tackle for a first pass. Opened #28 to discuss.

@benbalter
Copy link
Contributor Author

Thanks all for the feedback. Sounds like we've got a few follow up discussion to tackle in new issues, but things are at least solid enough here to merge, for now, and we can continue to improve the template.

benbalter added a commit that referenced this pull request May 18, 2015
Use Atom template for feed
@benbalter benbalter merged commit 2c55e7d into master May 18, 2015
@benbalter benbalter deleted the atom branch May 18, 2015 20:57
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

What feed format is best?

7 participants