fix: generate rss.xml file by lowercasing get() function#4678
Merged
Conversation
Following the [rss-feed blog tutorial](https://docs.astro.build/en/tutorial/5-astro-api/4/#install-astros-rss-package) Issue: When running `npm run build` then `npm run preview`, rss.xml file does not seem to be created, as /rss.xml on local returns a 404. Potential solution: This issue was solved after lowercasing GET() from: `export async function GET() {` to: `export async function get() {` by finding and applying [koba-masa's suggestion on Astro discord channel](https://discord.com/channels/830184174198718474/1147825423594565752/1147825423594565752)
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
sarah11918
approved these changes
Sep 13, 2023
Member
sarah11918
left a comment
There was a problem hiding this comment.
Thanks for this, @Knorgias !
Just to let you know, the underlying problem is that the RSS generating method needs updating for v3.0, which WILL eventually use the capital GET. But you're right, while we continue to have the older instructions from v2.0, it needs to be the lower case get. So don't be surprised if you come back in a few weeks and we've updated this whole page again to use GET, because that is eventually our long term solution!
But so that it works for people until then, this is a great help! 🙌 Welcome to Team Docs! 🥳
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of changes does this PR include?
Description
After following the rss-feed blog tutorial I came across an issue.
Issue:
When running
npm run buildthennpm run preview, rss.xml file does not seem to be created, as /rss.xml on local returns a 404.Potential solution:
This issue was solved after lowercasing GET()
from:
export async function GET() {to:
export async function get() {by finding and applying koba-masa's suggestion on Astro discord channel