statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 234 forks source link

Sitemap is missing lastmod values #1008

Open andersme opened 1 year ago

andersme commented 1 year ago

Is there a way to get the generated sitemap to include the lastmod values?

jermdavis commented 11 months ago

I came across this ticket when I noticed the same thing about my site generated with Statiq. I'm not sure if this is "the right" answer or not, but after a bit of spelunking through the code I did make it work. If this is still an issue for you @andersme, perhaps this post might offer some help?

https://blog.jermdavis.dev/posts/2023/extend-statiq-sitemap

andersme commented 11 months ago

I came across this ticket when I noticed the same thing about my site generated with Statiq. I'm not sure if this is "the right" answer or not, but after a bit of spelunking through the code I did make it work. If this is still an issue for you @andersme, perhaps this post might offer some help?

https://blog.jermdavis.dev/posts/2023/extend-statiq-sitemap

That is exactly what I'm looking for. I'll try it out. Thanks for the help!

andersme commented 11 months ago

The fix above does work perfectly. I think this should be the default behavior.

jermdavis commented 11 months ago

Awesome. Glad to hear that's helped you solve your problem.

I'll have a think about a suitable PR for the change, and see if the maintainers want to accept that.