Generate xml Sitemap
This PR adds the ability for BlazorStatic to create an xml sitemap for the generated site.
The sitemap model follows google's sitemap recommendation and it can be disabled by the user with BlazorStaticOptions.GenerateSitemap
Deploy Preview for blazorstatic ready!
| Name | Link |
|---|---|
| Latest commit | fc13955d362c6a129ed9463973aa85c2bb0c1a6c |
| Latest deploy log | https://app.netlify.com/sites/blazorstatic/deploys/66c32ae202ce0c00085d2fdd |
| Deploy Preview | https://deploy-preview-21--blazorstatic.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
So maybe turning off the sitemap as default option and then just have
SiteUrlForSiteMapwhich non-null value would signalize sitemap generation?
That sounds good, i will add it.
Isn't there any other option, witch some sort of "relative" links? How others are doing it?
I don't think that's possible, this was an oversight from me because the website is built in a local environment so it doesn't have access to the final url it will be hosted on.
As for others, I only have experience with jekyll and it does it this way, all jekyll themes have a baseUrl field in their config files.
I also want to note that lastmod node is not needed so I can just remove it.
If jekyll has it, than it is probably way to go. I was thinking about some solution that would change this as part of deployment process, but that means we need to specify this somewhere else or do some tricks to retrieve the final url for the website (it is possible with gh actions if don't have custom domain)...
Don't remove the lastmod, it would be "half-baked sitemap product".