Open nhoizey opened 3 years ago
I just made a much lighter version without all CSS rules that were not used and using simple CSS instead of a bunch of utility classes: https://github.com/nhoizey/nicolas-hoizey.com/commit/ac2ad201c7649909e5c7f98f385ab152fac82850
Would you find it useful here?
Works nicely for my Jekyll generated atom feed at https://jay.gooby.org/feed.xml
I was about to write my own when I found this issue. It works flawlessly for my Atom feed, thank you @nhoizey! Would it be possible to merge your Atom XSL with this repository? Maybe we could have a pretty-feed-v3-rss.xsl
and pretty-feed-v3-atom.xsl
version here? This prevent newbies like myself to try to apply the RSS version to an Atom feed?
Just stumbled upon this issue randomly: I recently made an XSL that works for both RSS and Atom: https://gist.github.com/Dan-Q/149579c66c938b566c45beefcf5914a4
The trick is to have a <xsl:for-each select="/rss/channel/item">
and a <xsl:for-each select="/atom:feed/atom:entry">
- the former iterates through the posts if it's an RSS feed, the latter if it's an Atom feed.
It's probably reasonably feasible to do similar things with the title etc.
I tried to use
pretty-feed-v3.xsl
for my Atom feeds, but it didn't work at all because Atom and RSS have different XML structures.I tried to build an alternative version for Atom feeds, but I don't know if my specific Atom feeds match the common use case.
I also don't know if it would be possible to share a single XSL stylesheet for both RSS and Atom.
Here's my version: https://github.com/nhoizey/nicolas-hoizey.com/blob/main/src/assets/pretty-atom-feed-v3.xsl
Here's how it looks: https://nicolas-hoizey.com/feeds/all.xml
A few notes:
target="_blank"
attributes for accessibility<xsl:template>
to ease maintenanceI can make a PR if you want to iterate over it.