Skip to content
Discussion options

You must be logged in to vote

I just wanted to create an RSS feed and realized I could return the feed in the GET method of src/app/rss.xml/route.ts instead.

If someone else wants to create a file or something like that you can try a simialr approach and do it this way.

I don't like using next.config.js because from what I've seen it gets executed more than once when building the static site. And I don't like creating and running a separate script either because I am deploying my site to github pages using a Github Action that runs next build instead of npm build. I could change that easily but I think it makes more sense to find a JS file in the project to execute my code to make sure it gets executed once even if I …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@icyJoseph
Comment options

Answer selected by adriancuadrado
Comment options

You must be logged in to vote
2 replies
@adriancuadrado
Comment options

@ivocreates
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants