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

Post links in Atom feed broken in XSLT preview #11060

Closed
7 tasks done
StefanWallin opened this issue Apr 4, 2025 · 1 comment · Fixed by #11068
Closed
7 tasks done

Post links in Atom feed broken in XSLT preview #11060

StefanWallin opened this issue Apr 4, 2025 · 1 comment · Fixed by #11068
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@StefanWallin
Copy link

StefanWallin commented Apr 4, 2025

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

When browsing https://docusaurus.io/blog/atom.xml in a browser, and you might want to read the full post of one of the entries, the natural thing is to click the heading to go to the post since it is a link.

However, the atom.xsl looks for an xml-tag <link rel="alternate" href="..." />, but it does not exist. In contrast, feed.xsl looks for an xml-tag <link href="..." /> which works.

My question
I can submit a PR to remove the qualifier expecting the alternate rel. However I'm wondering if this was simply a mistake in #9252 when it was introduced or if there is a feature within docosaurus that could produce two links per blog post and then have some sort of preference of which of the links to pick(which can easily be done with an xsl:choose-tag.

Reproducible demo

view-source:https://docusaurus.io/blog/atom.xml

Steps to reproduce

  1. Open view-source:https://docusaurus.io/blog/atom.xml and note that the entry has a link-child, but not link[rel=alternate]-child.
  2. Open https://docusaurus.io/blog/atom.xml, click the heading of any post.
  3. Your browser now renavigates to the same page you are already on.

Expected behavior

I expected to end up on the entrys blog post.

Actual behavior

I remained (re-navigated to) the atom feed XSLT-processed webpage.

Your environment

  • docosaurus.io as of 2025-04-04
  • <meta name=generator content="Docusaurus v3.7.0">

Self-service

  • I'd be willing to fix this bug myself.
@StefanWallin StefanWallin added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Apr 4, 2025
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Apr 7, 2025
@slorber
Copy link
Collaborator

slorber commented Apr 7, 2025

Thanks 👍

Should be fixed in #11068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants