alshedivat / al-folio

A beautiful, simple, clean, and responsive Jekyll theme for academics
https://alshedivat.github.io/al-folio/
MIT License
10.6k stars 10.97k forks source link

RSS Feed for Blog part #263

Closed dag7dev closed 3 years ago

dag7dev commented 3 years ago

It is so useful to have a RSS XML generated file, suitable for theoldreader or your favourite RSS reader.

In this way, someone could easily read your contents.

@alshedivat the only "problem" I am thinking about is the standardization of certain elements: in my blog for example, images and blockquotes are treated with bootstrap (raw html identities), since they are not in standard markdown, due to the inability of centering them with markdown, this could be a problem while parsing, because each of us could easily treat them in a different way, so we should deal with a lot of tags.

But it seems a great PoC to me, even if it would "just work with text", it should be a giant leap.

alshedivat commented 3 years ago

@dag7dev, thanks for raising this. I agree, having RSS support would be nice to have.

Yes, standardizing blog elements could be a potential obstacle. I haven't looked into RSS before. Do you have an idea how other themes or blogs deal with that? I'm guessing, any bootstrap-based blog faces the same issue.

dag7dev commented 3 years ago

@dag7dev, thanks for raising this. I agree, having RSS support would be nice to have.

Yes, standardizing blog elements could be a potential obstacle. I haven't looked into RSS before. Do you have an idea how other themes or blogs deal with that? I'm guessing, any bootstrap-based blog faces the same issue.

Not sure if I correctly understand. If you mean "in general" they usually create a RSS file (that looks really similar to XML files), with a bunch of RSS tags. If you mean in some blogs...well, I am unable to find them; however, Hugo implements this behaviour in an easy way (https://gohugo.io/templates/rss/ just FIY: Hugo is another framework to generate static websites).

Apart from this, that seems a very huge work even if I think it's the best approach, we could try to start from HTML and to parse all the content in the "body" section.

I think we can't predict every variable, and I think at a certain point that users really interested in RSS will take some decisions.

For example, we could limit generating RSS just by using text enclosed in "p" tags and images enclosed in "img" html tags. In this way, we can avoid potential unwanted situations, like broken RSS and so on, so we can limit RSS just to those two tags.

dag7dev commented 3 years ago

I also found this: https://github.com/jekyll/jekyll-feed so I think it is easier