docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

Blog feeds render nicely by default (XSLT stylesheet)

Open slorber opened this issue 2 years ago • 6 comments

Have you read the Contributing Guidelines on issues?

Motivation

It is possible to style how an XML file is rendered by browsers thanks to XML XSLT stylesheets:

https://darekkay.com/blog/rss-styling/

image

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/rss.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:media="http://search.yahoo.com/mrss/">
  ...
</feed>

I think it could be useful to have a beautiful XML output by default for XML-based feeds.

We could also add an icon in the blog sidebar to link to that feed, helping users know that a feed is available.

image

(this could become later a "blog sidebar item type", related to https://github.com/facebook/docusaurus/issues/7227)


Also, it can be the occasion to do some additional cleanup in the RSS feed item content:

CleanShot 2023-08-03 at 18 28 19@2x CleanShot 2023-08-03 at 18 29 59@2x

Are the className attributes set by the Docusaurus theme really needed to be in the feed item content? I doubt it leads to any significant styling difference from RSS readers considering they don't have the stylesheet.

Self-service

  • [ ] I'd be willing to do some initial work on this proposal myself.

slorber avatar Aug 03 '23 16:08 slorber

@slorber can I take this issue? Is there any prerequisite knowledge to taking this issue?

caramelmelmel avatar Aug 05 '23 10:08 caramelmelmel

You can submit a PR if you think you are able to work on it. It's up to you to figure out if you have the required skills.

slorber avatar Aug 05 '23 14:08 slorber

@slorber Give me a week to investigate on this and then get back to you

caramelmelmel avatar Aug 06 '23 02:08 caramelmelmel

@slorber what actually you want in this issue. can you please specify. I am new to opensource by knowing more about this issue i will be able to contribute to this issue

KirtiKamal avatar Sep 23 '23 09:09 KirtiKamal

@KirtiKamal we already have a PR for this issue that I should review soon: https://github.com/facebook/docusaurus/pull/9252

If you don't understand what the issue is about, then try to find another to contribute to. We unfortunately don't have time to help you figure it out 😅

slorber avatar Sep 25 '23 09:09 slorber

I'd like to see an entire docusaurus site available as xml - xslt-fo could be a nice way to finally generate some good looking pdf content.

jeacott1 avatar Nov 22 '23 00:11 jeacott1