Skip to content
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

Generates sitemap1.xml.gz instead of sitemap.xml.gz #37

Open
vintikzzz opened this issue Aug 9, 2020 · 0 comments
Open

Generates sitemap1.xml.gz instead of sitemap.xml.gz #37

vintikzzz opened this issue Aug 9, 2020 · 0 comments

Comments

@vintikzzz
Copy link

Hi! I have code like this:

	sm := stm.NewSitemap(0)
	sm.Create()
	sm.SetDefaultHost("https://example.org")
	sm.SetPublicPath(".")
	sm.SetCompress(true)
	// sm.SetSitemapsPath(".")
	sm.SetAdapter(&S3Adapter{})
	sm.Add(stm.URL{{"loc", ""}, {"changefreq", "daily"}})
	if err := makeThreadsSitemap(db, sm); err != nil {
		return errors.Wrap(err, "failed to generate sitemap for threads")
	}
	sm.Finalize().PingSearchEngines()
	log.Println("finish")

That outputs this log:

2020/08/09 18:56:04 start
2020/08/09 18:56:07 /go-sitemap-generator/v2/stm/sitemap.go:14: Max processors 6
sitemaps/sitemap1.xml.gz '6143' links
Ping now: http://www.bing.com/webmaster/ping.aspx?siteMap=https://example.org/sitemaps//sitemap.xml.gz
Ping now: http://www.google.com/webmasters/tools/ping?sitemap=https://example.org/sitemaps//sitemap.xml.gz
Successful ping of `http://www.google.com/webmasters/tools/ping?sitemap=https://example.org/sitemaps//sitemap.xml.gz`
Successful ping of `http://www.bing.com/webmaster/ping.aspx?siteMap=https://example.org/sitemaps//sitemap.xml.gz`
2020/08/09 18:56:29 finish

There is no index file in my case. Only first sitemap chunk. And also there is double slashes in ping-urls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant