Use jekyll-feed to generate the default site's RSS feed #5196

Merged
merged 1 commit into from Aug 6, 2016

Projects

None yet

5 participants

@benbalter
Contributor

Rather than encouraging each new Jekyll use to hard code a RSS feed template in their generated site (where it's frozen in carbonite and will never receive bug fixes or new features), we should instead rely on the office Jekyll Feed plugin to generate the default site's RSS feed.

As an added benefit, it gives us an opportunity to show users how to use themes (and further hints that they exist and that they should use them, rather than hard-coding templates they found on the internet).

Practically, Jekyll Feed is a drop in replacement, but is a bit more battle tested, in that it handles a few edge cases surfaced from being used in some many different environments, supports relative URLs in posts, includes author metadata, post summaries, and images (all if present).

You can see the Jekyll Feed Template to compare.

@benbalter benbalter use jekyll-feed for default site RSS feed
58cd8f3
@parkr
Member
parkr commented Aug 3, 2016

Nokogiri has C dependencies, so I'm 👎 on this. It will break the default site for most Windows users.

@benbalter
Contributor

It will break the default site for most Windows users.

Does it matter that it's a dev dependency thus shouldn't be a problem for building the site, only for contributing to jekyll-feed?

@parkr
Member
parkr commented Aug 3, 2016

Does it matter that it's a dev dependency thus shouldn't be a problem for building the site, only for contributing to jekyll-feed?

YOU ARE TOTALLY RIGHT. My bad. I just took a look at the RubyGems.org page, saw it and left that comment. Sorry!

LGTM.

@benbalter
Contributor

🤘 Will give it a bit to sit, in case others want to weigh in.

@benbalter
Contributor

Also to note, I purposely did not use {% feed_meta %} in the template, as that would break the build if for some reason jekyll-feed wasn't loaded (e.g., no bundler, removed from Gemfile, etc.). Better to 404 than to fail the build.

On a related note, it'd be awesome to be able to check if a plugin's installed, e.g., {% if site.plugins | include: "jekyll-feed" %}.

@pathawks
Member
pathawks commented Aug 3, 2016

Cool 👍

@envygeeks
Member

I'm 👍, LGTM.

@parkr
Member
parkr commented Aug 6, 2016

@jekyllbot: merge +bug

@jekyllbot jekyllbot merged commit 61eda2e into master Aug 6, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jekyll/lgtm Approved by @parkr and @envygeeks.
@jekyllbot jekyllbot added bug fix labels Aug 6, 2016
@jekyllbot jekyllbot deleted the site-template-jekyll-feed branch Aug 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment