Unable to generate RSS feed with directory format consistently across DEV and PROD environments #11447
Labels
- P2: has workaround
Bug, but has workaround (priority)
pkg: rss
Related to the `@astrojs/rss` package (scope)
requires refactor
Bug, may take longer as fixing either requires refactors, breaking changes, or considering tradeoffs
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
For my site, I use the "directory" format:
https://example.com/page/
I would like to have my RSS feed like this as well:
https://example.com/feed/
But I can't find any combination of the generating endpoint file name, trailingSlash and build.format to achieve this.
File
/pages/feed.js
,trailingSlash: always
,build.format: directory
:-> DEV:
/feed
has a 404,/feed/
works. PROD: Generates/feed
file,/feed/
has a 404File
/pages/feed/index.js
,trailingSlash: always
,build.format: directory
:-> Same behaviour as
/pages/feed.js
If it's not possible to put an RSS feed as a directory, I would be kind of content with just using
/rss.xml
, but that has it's own problem: It is not reachable on the DEV server any more.File
/pages/rss.xml.js
,trailingSlash: always
,build.format: directory
:-> DEV:
/rss.xml
has a 404,/rss.xml/
works. PROD: Generates/rss.xml
file,/rss.xml/
has a 404What's the expected result?
There should be a combination of
trailingShash
andbuild.format
that behaves consistently for DEV and PROD for endpoint routes.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-6vyntu
Participation
The text was updated successfully, but these errors were encountered: