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

blog: RSS and Atom feeds ignoring baseUrl #4956

Closed
3 tasks done
jsamr opened this issue Jun 13, 2021 · 0 comments · Fixed by #4962
Closed
3 tasks done

blog: RSS and Atom feeds ignoring baseUrl #4956

jsamr opened this issue Jun 13, 2021 · 0 comments · Fixed by #4962
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@jsamr
Copy link
Contributor

jsamr commented Jun 13, 2021

🐛 Bug Report

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.

Description

RSS <link>, Atom <id>, <link> and <icon> are missing the baseUrl path from configuration, misleading feeds readers. Note however that entries are not affected by this bug.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Run npx @docusaurus/init@latest init docusaurus-base-url-bug classic
  2. Add baseUrl: "/test/" config in docusaurus.config.js
  3. Make sure you are using the classic preset
  4. Activate blog feeds with { blog: feedOptions: {type: 'all' } } in classic preset config object.
  5. Run yarn build
  6. Inspect atom.xml and rss.xml files in build/blog

Expected behavior

RSS channel root link is including baseUrl

<rss version="2.0">
    <channel>
        <link>https://domain.com/test/blog</link>
    </channel>
</rss>

Atom feed id, link and icon root tags are including baseUrl

<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://domain.com/test/blog</id>
    <link rel="alternate" href="https://domain.com/test/blog"/>
    <icon>https://domain.com/test/favicons/favicon-32x32.png</icon>
</feed>

Actual Behavior

RSS channel root link is ignoring baseUrl

<rss version="2.0">
    <channel>
        <link>https://domain.com/blog</link>
    </channel>
</rss>

Atom feed id, link and icon root tags are ignoring baseUrl

<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://domain.com/blog</id>
    <link rel="alternate" href="https://domain.com/blog"/>
    <icon>https://domain.com/favicons/favicon-32x32.png</icon>
</feed>

Your Environment

Reproducible Demo

https://github.com/jsamr/docusaurus-base-url-bug

@jsamr jsamr 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 Jun 13, 2021
@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Feb 23, 2022
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