Have you read the Contributing Guidelines on issues?
Prerequisites
Description
My deployment (nginx-s3 ingress) requires trailing slashes, so I'm using trailingSlash: true. This works for URLs on the web pages, but the ones in blog feeds (RSS and Atom) do not get a trailing slash and therefore do not work.
Reproducible demo
No response
Steps to reproduce
# create a new site and build
npx create-docusaurus@latest reprex classic
cd reprex
npm run build
# links to an example blog post are without a trailing slash, both in index.html:
grep -o ".......blog/welcome.." build/blog/index.html
# href="https://github.com/blog/welcome">
# href="https://github.com/blog/welcome">
# and in the RSS and Atom feeds:
grep -o ".......blog/welcome.." build/blog/rss.xml
# te.com/blog/welcome</
grep -o ".......blog/welcome.." build/blog/atom.xml
# te.com/blog/welcome"/
# add 'trailingSlash: true' to the config and re-build
gsed -i '12 a\ trailingSlash: true,' docusaurus.config.js
npm run build
# now links in index.html are with the trailing slash:
grep -o ".......blog/welcome.." build/blog/index.html
# href="https://github.com/blog/welcome/"
# href="https://github.com/blog/welcome/"
# but the RSS and Atom feed ones are still without a trailing slash:
grep -o ".......blog/welcome.." build/blog/rss.xml
# te.com/blog/welcome</
grep -o ".......blog/welcome.." build/blog/atom.xml
# te.com/blog/welcome"/
Expected behavior
URLs on both the web pages and the feeds respect the trailingSlash setting.
Actual behavior
Web pages are affected by trailingSlash but feeds are not.
Your environment
- Docusaurus version used: 2.0.0-beta.21
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Node v18.3.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS Big Sur 11.6.5
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
My deployment (nginx-s3 ingress) requires trailing slashes, so I'm using
trailingSlash: true. This works for URLs on the web pages, but the ones in blog feeds (RSS and Atom) do not get a trailing slash and therefore do not work.Reproducible demo
No response
Steps to reproduce
Expected behavior
URLs on both the web pages and the feeds respect the
trailingSlashsetting.Actual behavior
Web pages are affected by
trailingSlashbut feeds are not.Your environment
Self-service