ikeikeikeike / go-sitemap-generator

go-sitemap-generator is the easiest way to generate Sitemaps in Go
https://github.com/ikeikeikeike/go-sitemap-generator
MIT License
220 stars 65 forks source link

How to avoid create a directory "public"? #16

Open bydeath opened 7 years ago

bydeath commented 7 years ago

I set a SetPublicPath to '/tmp', there are xml file in. Bug there is another directory named "public". So I also use SetSitemapsPath to '/tmp'. But the directory "public" is created. how to avoid create the "public " directory? And I don't need to upload the sitemap file to remote machine. I just need to generate the xml file locally.

bydeath commented 7 years ago

The content of xml in "public" contain a sitemapindex tag

soata commented 6 years ago

You must call Sitemap.Create after SetPublicPath / SetSitemapsPath.