go-sitemap-generator
go-sitemap-generator copied to clipboard
go-sitemap-generator is the easiest way to generate Sitemaps in Go
``` sm := stm.NewSitemap(1) sm.SetDefaultHost(someHost) sm.Create() sm.Add(stm.URL{{"loc", "/posts"}, {"changefreq", "monthly"}}) ``` ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6059b8] goroutine...
Hi everyone. As far as neither this package is actively maintained nor any other active package can be found for generating sitemaps in Go, I have made a new one...
Currently, when specifying alternates in the sitemap URLs, they are omitted from the generated sitemap. This adds support for alternate links and fixes #41.
Looking at [google](https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap) and the [sitemap.org](https://www.sitemaps.org/protocol.html), it seems that `lastmod` date_format is more often used in `yyyy-mm-dd` than `RFC3339`, so I propose a fix for the optional setting of date_format....
I'm trying to handle language routes in my generator script. Checked your sources and found that "alternates" keyword, so tried to do in that way: It's not working at all,...
#42
``` 2021/02/21 13:30:31 test_job.go:6: This is a test job 2021/02/21 13:30:36 generate_sitemaps_job.go:19: Generating sitemaps 2021/02/21 13:30:36 /home/user/projects/test_project/src/jobs/test_job.go:6: This is a test job ``` https://github.com/ikeikeikeike/go-sitemap-generator/blob/c473e35ca5f0ce3059e2417fa95959adfd3428ce/stm/sitemap.go#L10
When I create sitemaps using this repo is seems like "changefreq" and "priority" tags are being added, with default values of "weekly" and "0.5" respectively. How can I unset them...
Please remove logging from NewSitemap() https://github.com/ikeikeikeike/go-sitemap-generator/blob/c473e35ca5f0ce3059e2417fa95959adfd3428ce/stm/sitemap.go#L14
Hi guys, Hope you are all well ! I just went through this article https://ohgm.co.uk/an-alternative-approach-to-xml-sitemaps/ suggesting to lower (1000 to 10000) the number of links per sitemaps and to order...