Git Product home page Git Product logo

jekyll-feed's Introduction

Gem Version Linux Build Status Windows Build status Backers on Open Collective Sponsors on Open Collective

Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind GitHub Pages, which you can use to host sites right from your GitHub repositories.

Philosophy

Jekyll does what you tell it to doΒ β€” no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.

See: https://jekyllrb.com/philosophy

Getting Started

Diving In

Need help?

If you don't find the answer to your problem in our docs, or in the troubleshooting section, ask the community for help.

Code of Conduct

In order to have a more open and welcoming community, Jekyll adheres to a code of conduct adapted from the Ruby on Rails code of conduct.

Please adhere to this code of conduct in any interactions you have in the Jekyll community. It is strictly enforced on all official Jekyll repositories, websites, and resources. If you encounter someone violating these terms, please let one of our core team members know and we will address it as soon as possible.

Credits

Sponsors

Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. Become a sponsor! Jekyll Sponsor 0 Jekyll Sponsor 1 Jekyll Sponsor 2 Jekyll Sponsor 3 Jekyll Sponsor 4 Jekyll Sponsor 5 Jekyll Sponsor 6 Jekyll Sponsor 7 Jekyll Sponsor 8 Jekyll Sponsor 9

Contributors

This project exists thanks to all the people who contribute. Jekyll Contributors

Backers

Thank you to all our backers! πŸ™ Become a backer

Jekyll Backers

License

See the LICENSE file.

jekyll-feed's People

Contributors

artlogic avatar ashmaroli avatar benbalter avatar coliff avatar dirtyf avatar enteee avatar envygeeks avatar fleeting avatar garthdb avatar guilhermesimoes avatar haacked avatar jekyllbot avatar jez avatar jokester avatar kenman345 avatar kylebarbour avatar lax avatar localheinz avatar michaelnordmeyer avatar mishina2228 avatar mohd-akram avatar orderedlist avatar oturpe avatar parkr avatar pathawks avatar pmb00cs avatar rotzbua avatar sylhare avatar torrocus avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-feed's Issues

Unexpanded links in <content>...</content> elements

I just installed this nice plug-in to my site (http://gnuarmeclipse.github.io/feed.xml) and when I viewed the articles in feedly I noticed the images are not ok.

checking the xml, I discovered something like this:

&lt;p&gt;&lt;img src=&quot;%7B%7B%20site.baseurl%20%7D%7D/assets/images/2015/github-gae-header.png&quot; alt=&quot;GNU ARM Eclipse GitHub Home&quot;&gt;&lt;/p&gt;

obviously the {{ site.baseurl }}was not expanded properly in the <content>...</content> elements. I guess the same happens in the <summary>...</summary> elements too, but I can't prove it, my site has simple summary paragraphs.

would it be possible to expand the variables when generating the feed.xml file, and produce a functional page?

Incorrect `link[href]` value if baseurl is provided in _config.yml

Given the following _config.yml file content:

baseurl: /blog
feed:
  path: feed.xml

The liquid tag {% feed_meta %} renders:

<link type="application/atom+xml" rel="alternate" href="feed.xml" title="..." />

(instead of)

<link type="application/atom+xml" rel="alternate" href="/blog/feed.xml" title="..." />

Whereas the feed is properly generated at localhost:4000/blog/feed.xml (and not at localhost:4000/feed.xml`.

If I change the value of the path to blog/feed.xml, the link[href] value is correct but then the feed content is not rendered at the given URL.

Is there anything special to do? I thought we'd have followed the README correctly.

Thanks :-)

refs sudweb/blog#10

_config.yml name vs title

Currently jekyll-feed expects name in _config.yml as title of the website. Does it make more sense semantically to expect a title variable instead? Jekyll itself doesn't seem to care either way.

Find author by reference

On my blog there are two authors. Their properties are defined in the _config.yml:

authors:
  foo:
    name: "Foo"
    email: "[email protected]"
    uri: "http://foo.com"
  bar:
    name: "Bar"
    email: "[email protected]"
    uri: "http://bar.com"

In the post's YAML frontmatter I put:

title: My Post
author: foo

Then later I extract the actual author with site.authors[post.author]. I do this so I don't have to write all those details in each post.

Is there a way to make something like this work with jekyll-feed?

Handling of whitespace in title / excerpt

Problem

The current feed.xml strips newlines from the title and excerpt. However, that leaves no space between the last word of a line and the first word of the next line.

Example

The markdown

This is some
text

leads to This is sometext.

Suggestion

Replace strip_newlines with replace: '\n', ' '.

Update: or rather replace: '\r\n', ' ' | replace: '\n', ' '.

Gem won't compiling on Cygwin

Hi,

I can't install the gem anymore on my up-to-date cygwin.

Actually, nokogiri is the cause.

The requested nokogiri version is the >1.6 and it will try to install the version 1.6.6.2which won't install on Cygwin.

After some searchs, I found out it is a known bug (https://groups.google.com/forum/#!topic/nokogiri-talk/BigaPrf2AwE).

I can confirm I have been able to install the version 1.6.7.rc3.

Please update the requested version to the 1.6.7 final release as soon as you can.

Regards and good job for the rest,
Rudy

`feed_meta` tag raises ArgumentError when `site.baseurl` is empty

Hello, developpers.
I have a request to fix an error.

When I embedded {% feed_meta %} in HTML files, I encountered an error like bellow.

C:\fakepath> bundle exec jekyll serve
Configuration file: C:/fakepath/_config.yml
            Source: C:/fakepath
       Destination: C:/fakepath/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Liquid Exception: bad argument (expected URI object or URI string) in foo.html, included in bar.html
jekyll 3.0.5 | Error:  bad argument (expected URI object or URI string)

C:\fakepath> bundle show jekyll-feed
C:/path/to/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-feed-0.5.1

I found that when I change site.baseurl from empty to "" in _config.yml, the error disappears.

baseurl: # The error raised
baseurl: "" # No error raised

I guess the code URI.join(config["url"], config["baseurl"]) raises the error because config["baseurl"] is nil.
(Note that I'm not familiar with ruby programming and jekyll's internal system.)

jekyll new creates _config.yml such that site.baseurl is empty.
Could you fix it?

Using {{ site.url }} doesn't render the URL

My post contains:

<img src="{{ site.url }}/images/io.png" alt="io" />

and while it renders properly in the post, it is rendered in the feed.xml as:

<img src="{{%20site.url%20}}/images/io.png" alt="io" />

I've tried without spaces (and also using site.github.url) but still the url isn't referenced in the feed.

Syntax highlighting Liquid tags are not working in feed entry

Jekyll Pygments syntax highlighting Liquid tags are not rendering a code block in feed entry.

Following are issues feed examples generated by jekyll-feed plugin:

Example 1

capture-ben-feed

Example 1 β€” Feed output

capture-ben-feed-output

Example 2

capture-milan-feed

When I try to test/check the issue in the post excerpt:
capture-milan-post-excerpt

Example 2 β€” Feed output

capture-milan-feed-output


Not sure what's the main reason behind this issue but when I used to have custom Atom feed template for Jekyll, it used to work with the following pattern:

{{ post.content | xml_escape }}
{{ post.excerpt | strip_html | strip_newlines | xml_escape }}

I found jekyll-feed plugin using following pattern, where markdownify may have created this issue:

{{ post.content | markdownify | xml_escape }}
{{ post.excerpt | markdownify | strip_html | strip_newlines | xml_escape }}

Note: But with the same pattern there is no problem in HTML output like in meta description with the following code using markdownify:

{{ page.excerpt | markdownify | strip_html | strip_newlines | truncate: 160 }} 

`isPermaLink` configuration

Per the specs

If the guid element has an attribute named "isPermaLink" with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the element.

Personally, I always have that true since it fits my use cases. But, the default currently is false.

So, we could either change the default to true or allow the user to configure this.

Only change the updated field if posts change

It'd be nice if this plugin would only update the value of the atom:updated element if there's change in the feed's contents.

RFC 4287 says:

The "atom:updated" element is a Date construct indicating the most
recent instant in time when an entry or feed was modified in a way
the publisher considers significant. Therefore, not all
modifications necessarily result in a changed atom:updated value.

So I think it's okay not to change that value every time the site is built.

I think it should only change if there's a new post, of if any posts change, or if the feed header data changes. In other words, if building the feed would result in the same exact feed except for the updated element's value, then the feed doesn't need updating at all.

This also has the advantage of not needing to commit the new feed to version control, and not invalidating any caches of the feed for a meaningless change.

What should the path to the RSS feed be?

Theoretically, as long as it's exposed in the page metadata, it doesn't matter to computers.

I'm personally a fan of /feed/ (rendered as feed/index.xml), because pretty permalinks.

I've also seen rss.xml, atom.xml, and feed.xml, which seem less intuitive to me (going to a site, I can guess /feed, just as I might guess /about, but /atom.xml seems a bit more opaque).

The other issue to consider, most servers default configuration will look to index.xml after index.html (and serve the proper doctype), but there are some edge cases where it may not (GitHub Pages supports XML indexes for pretty permalinks).

Last, it feels silly, but we could theoretically say "all of the above" and render the same template into multiple spots (redirect-from isn't an option here, because redirect headers).

Make it official

There's no reason each site should have to struggle with the best way to publish an RSS feed of their Jekyll posts, a problem that's been solved a million times over (but right now, is limited to copy/pasta from blog posts with no clear winner).

There are lots of standards (RSS 1.0, RSS 2.0, Atom) to choose from, and lots of edge cases you shouldn't have to worry about. Similar to the sitemap plugin, we should figure out the "best" feed template, and distribute it as a set-it-and-forget-it plugin. See this conversation with @holman and @bkeepers for some context.

@parkr this is copied wholesale from jekyll-sitemap (swapping out sitemap.xml for feed.xml). If you're πŸ‘ I'd like to transfer this over to the Jekyll org and get some feedback on the template with the goal of getting in on Pages (since it's really just jekyll-sitemap with a different template).

FWIW, there's also an opportunity here to abstract 99% of this and jekyll-sitemap into one shared "plugin that injects a shared template" type plugin, but starting here, as this works.

Thoughts?

Changing site.url causes feed readers to display all posts as unread

Hi,
Could anybody point me to documentation, or at least discussion about the case, when jekyll will re-create all the RSS feeds resulting into duplicate on the reader side.
It is in some way a pain for blogs which are being aggregated with blog aggregators.
I've run into such issue very recently, I'm almost sure the below change in gems section was the reason (related commit).

before

gems:
  - jemoji
  - jekyll-sitemap

after

gems:
  - jekyll-feed
  - jekyll-sitemap

It could be also changing http into https in url jekyll variable.

My RSS feeds of previously released (and already broadcasted via rss) blog posts were re-broadcasted.
I would like to precisely know how to avoid re-distribution of my old blog posts in RSS in case of future commits to blog, so canonical docs would be the best.
Thanks in advance.

Production ready?

Is this production ready? I would like to add it to the list of default gems for our (non-Github Pages-Like) Docker images so that people get nice feeds right off the bat.

Generate a feed based on an arbitrary list

If jekyll-feed exposed a public API to generate a feed given an arbitrary set of posts, than other plugins like jekyll-archives would be able choose when to generate category specific feeds and whatnot.

This would add complexity to both jekyll-feed as well as any plugins that decided to take advantage of such a feature (jekyll-archives).

That said, it would be nice if those that wanted different feeds didn't have to reinvent the wheel, and could benefit from the work that has already been done here.

We would have to expose a public API by which a calling plugin could provide an array of posts, a title for the feed, and probably a filename. We would then be responsible for generating the feed.

This is different from #70 in that it only exposes an API that other plugins can call to generate an arbitrary feed, rather than us being responsible for what feeds the user wants built.

I do not imagine that this would be a very popular feature, and hopefully jekyll-archives would default to not generating any extra feeds unless specifically configured to do so, but it does seem to be an oft-requested feature.

jekyll/jekyll-archives#57

double // in feed.xml

with this in my _config.yml

baseurl:      /
url:          https://my.site.com

feed.xml will render as

...

<link href="https://my.site.com//" rel="alternate" type="text/html" />

...

<link href="https://my.site.com//2015/07/01/foo-bar/" rel="alternate" type="text/html" title="Foo Bar" />

...

<id>https://my.site.com//2015/07/01/foo-bar</id>
<content type="html" xml:base="https://my.site.com//2015/07/01/foo-bar/">

I could change the configuration to baseurl: "", but wouldn't that make the {{ site.baseurl }} rather useless? You would always have to use it like <a href="{{ site.baseurl }}/">. But maybe that's the Jekyll way?

Liquid syntax error in jekyll 3.0

jekyll 3.0.0.pre.beta5

While trying to serve:

Liquid Exception: Liquid syntax error: Expected end_of_string but found pipe in "post in site.posts | limit: 10" in feed.xml

Not sure why liquid is processing feed.xml, I thought anything not prefixed with _ won't get processed.

Exclude Drafts from feed

Hi there,

What do you think about filtering future posts from the feed.xml ?

To give you some context, most of the time I write a new article, I publish it with a future date, it is not listed and I send direct link to friends for proof reading. My problem is that even if my article has a future date, it still appears in the feed.xml...

Would you be willing to accept a PR if I work on it ? Is there any other way to filter posts appearing in the feed.xml ?

Thanks,

Liquid tag to add meta tags to head

Thinking something like {{ feed_meta }} which would output:

<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed.xml" />

Issue with relative URLs

I just upgraded from 0.4.0 to 0.5.0 and suddenly I get this error:

Liquid Exception: both URI are relative in _includes/head.html, included in _layouts/default.html
jekyll 3.1.2 | Error:  both URI are relative

I figured out that it's because you need to have http:// in front of your URL before, however you didn't need to in 0.4.0. Just curious if this was a intended change.

Project Goals

What are the goals of a Jekyll Feed plugin?

Will this produce a feed that takes advantage of every feature that RSS/Atom have to offer, or will it produce a minimum viable feed so that subscribers can be notified of new posts?

Will the plugin try to work around every possible YAML setup to extract things like date / author information, or will this plugin require sites to follow a specific format for front matter?

Will the plugin try to include image thumbnails? Geotag metadata? Podcast enclosures?

Will the plugin offer any sort of "hooks" for others to inject this sort of data?

Better author support

Allow defining a site/post author as a simple key value pair (name: Ben) or, as an object, e.g.:

author:
  name: Ben
  uri: "http://ben.balter.com"
  email: [email protected]

In the first case, we'd just set author.name to Ben, and in both cases, only output the field (which is supported within the atom spec) if present.

jekyll build error: no implicit conversion of Hash into String

After updating from github-pages 36 to 37 (and 38) and adding jekyll-feed to the config.yml's gem section:

gems:
   - jekyll-feed

When running bundle exec jekyll build I get this error jekyll 2.4.0 | Error: no implicit conversion of Hash into String.

After I did bundle update, I noticed the only other gems that were updated was jekyll-feed 0.3.0 (was 0.2.3).

So something changed between 0.2.3 and 0.3.0 of jekyll-feed.

Not only does it occur on my CentOS machine, but also on when CodeShip is making a build of it.

Validate feed

I wonder if we could use something like alexdunae/w3c_validators to let Travis validate our feed.

This would take a lot of the guess work out of a particular change being ok or not.

Site author does not utilize author reference

Going through lib/feed.xml I noticed it generates the feed's main author tag only from author data set in the main config. Would there be any benefit to adding support for using data in a _data/authors.yml file to reduce the duplication of data that could potentially be out of sync?

If it would be worth it I'd be happy to make a pull request.

Somethings broken with the liquid `feed_meta`

Might this have to do with the recent jekyll upgrade?

If I build as github does with bundle exec jekyll build --safe then I get the following error:

Liquid Exception: Liquid syntax error (line 22): Unknown tag 'feed_meta' in _includes/head.html, included in _layouts/default.html
jekyll 3.0.3 | Error:  Liquid syntax error (line 22): Unknown tag 'feed_meta'

However, if I don't pass --safe then everything works as expected.

line 22 is just {% feed_meta %} inside <head> in default.html.

I use the github-pages gem, here is my gem file:

source 'https://rubygems.org'

require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)

gem 'github-pages', versions['github-pages']
gem 'jekyll-feed'

and I have this in _config.yml:

# GH-pages supported plugins
gems:
  - jekyll-feed
  - jekyll-mentions
  - jemoji
  - jekyll-redirect-from
  - jekyll-sitemap

Limit RSS feed entries

Sicking Jekyll Feed loose on my personal site, with 100+ posts, resulted in a 1.1MB file, which is a bit silly for a feed... it shouldn't be an export of the entire site's content.

The go to design would be to add rss_limit or similar to your _config.yml file, defaulting to something like 10. That feels lame to me. Why would someone want 11? 25? 5? Feels like we're abstracting a variable for the sense of not hard-coding a number, but I don't see why the number can't be hard-coded.

What's a good number of posts for a feed? The 10 most recent? 5 most recent? Let's figure out that magic number and just run with it, rather than pushing the question onto users.

Includes not parsed/removed

I use includes in my blog posts. It seems like they are not parsed while generating feeds. I can see something like "{% include acronyms.md %}" in messages from my blog. How can I remove includes from feeds messages? Is there any option?

Excerpt Only feed

I suggest to have an option in config such that the rss feed includes excerpt only but not content.
Please pardon me if this feature is already here. I couldn't see it in the readme.

Self-reference doesn't match document location when validating feed

Hi all, I'm a new user to jekyll-feed, and I suspect the behavior I'm seeing is simply due to a misconfiguration on my part. However, I'm having a hard time finding the misconfiguration. When validating the Atom feed (you can see the validation results at http://feedvalidator.org/check?url=http:%2F%2Fblog.scottlowe.org%2Ffeed.xml) it reports "self-reference doesn't match document location", and I note that it's reporting the document at "http://blog.scottlowe.org//feed.xml". Any suggestions on how I can fix this to report the correct document location? Note that the plugin is generating a valid feed at http://blog.scottlowe.org/feed.xml, just the location is being reported incorrectly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.