-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Generate sitemap for dynamic deploy url #4923
base: main
Are you sure you want to change the base?
Generate sitemap for dynamic deploy url #4923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool, a couple of suggestions,
- the implementation should be outside of app.py and imported from there
- consider generating the sitemap.xml during compile time and place the resulting file in the frontend assets to avoid having to generate xml for each request, when the content is unlikely to have changed.
There is a plan to introduce dynamic sitemaps, f.e. for a blog. This would require to implement 2 different approaches, one for static sitemap and one for dynamic sitemap. We could f.e. try to auto-detect if dynamic features are used or add a config option for that. |
@masenf running it before compile time would mean that backend must replace deploy url if its different from the ones in sitemap. I would think the better approach would be to run the sitemap generation when the app is deployed for the first time on the server. This would allow the same image to be deployed in different servers with unique sitemaps. @benedikt-bartscher for dynamic routing thing, what i am thinking for the moment is that for each endpoint that accepts dynamic route, the sitemap generation for that route must be called. what do you say? |
…re the sitemap in _static folder, generate sitemap when the app is initialized.
…ns _pages dictionary
@masenf I have made changes as per your suggestions
|
CodSpeed Performance ReportMerging #4923 will not alter performanceComparing Summary
|
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
Changes To Core Features:
After these steps, you're ready to open a pull request.