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

make rss great again #148

Merged
merged 4 commits into from
Mar 14, 2017
Merged

make rss great again #148

merged 4 commits into from
Mar 14, 2017

Conversation

jarrodu
Copy link
Contributor

@jarrodu jarrodu commented Mar 4, 2017

I am a user of rss feed aggregators and find the current rss feed not as
useful as it could be. You can checkout the current state by looking at
http://typelevel.org/blog/feed.rss on feedbucket.com. The list of blog posts is
limited to 10 entries and the descriptions are very terse.

The terseness, I think, is a bug with the {% if post.excerpt %} line.
At some point Jekyll decided to auto-generate excerpts if one is not
given in the YAML header. So I think this if statement is always true.

I greped the posts directory and found no use of the excerpt variable
so I made the decision to just remove the use of the variable in the
feed.rss file.

The end result is a useful rss feed. It can be previewed at
feedbucket.com using this link
https://gist.githubusercontent.com/jarrodwb/003ea9995134bde814e6d3545529e483/raw/bbc5d244c734f55fce77dc5b08fc8140be32abea/rss-fixes.rss.

The formatting is beautiful on feedbin.com. This is the aggregator I use.

I am a user of rss feed aggregators and find the current rss feed not as
useful as it could be. You can checkout the current state by looking at
typelevel.org/blog/feed.rss on feedbucket.com. The list of blog posts is
limited to 10 entries and the descriptions are very terse.

The terseness, I think, is a bug with the `{% if post.excerpt %}` line.
At some point Jekyll decided to auto-generate excerpts if one is not
given in the YAML header. So I think this `if` statement is always true.

I greped the posts directory and found no use of the `excerpt` variable
so I made the decision to just remove the use of the variable in the
feed.rss file.

The end result is a useful rss feed. It can be previewed at
feedbucket.com using this link
https://gist.githubusercontent.com/jarrodwb/003ea9995134bde814e6d3545529e483/raw/bbc5d244c734f55fce77dc5b08fc8140be32abea/rss-fixes.rss.

The formatting is beautiful on feedbin.com. This is the aggregator I use.
Copy link
Contributor

@S11001001 S11001001 left a comment

Choose a reason for hiding this comment

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

I would love to emit full feeds with full content. I use them myself, and appreciate when full content is provided, so I can read directly in my aggregator.

However, if we are to emit full content, it should be more faithful to the original post. For example, code blocks should be syntax-highlighted, and Mathjax blocks should be processed into...something more useful than $R \equiv_m Q$. Else, it would be better to excerpt and direct via link to a faithful version (i.e. the original page).

It should also include relevant copyright and license information on each article. This isn't so important when excerpting, but an RSS user like me (and I bet @jarrodwb) will rarely see the original site again.

@jarrodu
Copy link
Contributor Author

jarrodu commented Mar 5, 2017

Hi. :-) Thanks for the review.

The notes on syntax highlighting and MathJax support are the responsibility of the RSS reader. Feedbin for instance provides syntax highlighting and code blocks for the new RSS feed where as FeedBucket does not. MathJax is similar but I am not sure if Feedbin supports it. Which article contains MathJax? I will take look and see if Feedbin does the right thing.

I agree on the the other note on copyright. I can put the same notice as is on http://typelevel.org/about.html which states all content is under CCA3.0 unless otherwise noted.

We should also definitely add the author. I missed that.

Cheers. :-)

@jarrodu
Copy link
Contributor Author

jarrodu commented Mar 5, 2017

I am not sure if I have the best solution to the license issue but I put the CC BY 3.0 license into the RSS feed for the whole channel. It is up to the RSS readers/aggregators to display this. I also added the license to each post by changing the post layout. This does not show up in the page content variable so it is not propagated to the RSS items description.

I want to do something like this {% include license.html | xml_escape %} in the feed.rss file but I get a liquid parsing error.

I think what I provided in my last commit is sufficient but is not as nice as I would like.

@jarrodu
Copy link
Contributor Author

jarrodu commented Mar 5, 2017

I used an CDATA tag to fix the problem I mentioned before. Now all items in the RSS feed have a license at the end of the article.

@S11001001
Copy link
Contributor

Hi @jarrodwb, thanks for the update to incorporate copyright+license information; looks nice.

The notes on syntax highlighting and MathJax support are the responsibility of the RSS reader.

I don't think this is true, especially when we can render something more likely to succeed for users. (By contrast, we can't do anything about a reader ignoring dc:creator, but we've done everything we can in that area.)

Feedbin for instance provides syntax highlighting and code blocks for the new RSS feed where as FeedBucket does not.

Would you mind sharing a screenshot of Feedbin's rendering of, say, the code block beginning with def twoInitsFromAHaystack from "Four ways to escape a cake"?

Which article contains MathJax? I will take look and see if Feedbin does the right thing.

One example is "Symbolic operators and type classes for Cats":

We call an operation ⊕ associative, if for all a, b and c, a⊕(b⊕c)=(a⊕b)⊕c holds.

@jarrodu
Copy link
Contributor Author

jarrodu commented Mar 5, 2017

I took some screenshots. It looks like even Feedbin does not automatically render MathJax. :-/

I don't have any ideas about how to render the posts before they hit the RSS feed. Maybe we can use what we have and improve on it later. If the rendering is a real blocker for this PR than maybe we can cherry pick some of my changes and abandon the idea of having complete posts shared through the RSS feed. Another option is to open some issues and simply close this PR.

https://drive.google.com/open?id=0B1ygQn_r10X_Z2tSNE5NbWw5T3M
https://drive.google.com/open?id=0B1ygQn_r10X_OTZWSFhRQlpTOHc

@S11001001
Copy link
Contributor

I took some screenshots. It looks like even Feedbin does not automatically render MathJax. :-/

It also does not handle syntax highlighting correctly. Note how everything after the # on the second line is treated as a comment; also, def is keyword-highlighted, but not val; hmm, Python, maybe?

It's worth spinning up two issues for these: #149, #150. Maybe @larsrh has some opinions on the rest.

@larsrh
Copy link
Contributor

larsrh commented Mar 8, 2017

I'm happy to merge this as it stands. As far as I can tell it is a strict improvement over the status quo. Is that right?

@S11001001 S11001001 dismissed their stale review March 10, 2017 00:29

I'm happy if @larsrh is happy :)

@jarrodu
Copy link
Contributor Author

jarrodu commented Mar 14, 2017

Is there any chance of getting a verdict on this? I would like to cross it off my todo list. :-)

@larsrh
Copy link
Contributor

larsrh commented Mar 14, 2017

Sorry, I missed that @S11001001 updated his review. Merging now.

@jarrodwb, thanks for the contribution!

@larsrh larsrh merged commit d6d8ecf into typelevel:development Mar 14, 2017
@jarrodu jarrodu deleted the rss-fixes branch March 14, 2017 13:09
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.

3 participants