Skip to content

Blog feeds render nicely by default (XSLT stylesheet) #9197

@slorber

Description

@slorber

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/

https://x.com/stefanjudis/status/1672230720536756224

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 #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: intermediateIssues that are medium difficulty level, e.g. moderate refactoring with a clear test plan.good first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.proposalThis issue is a proposal, usually non-trivial change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions