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

Allow omission of url defaults #33

Open freakingawesome opened 5 years ago

freakingawesome commented 5 years ago

This allows for the explicit removal of lastmod, priority, and changefreq XML nodes, rather than setting them to default values.

Usage:

opts := Options{}
opts.SetOmitDefaultLastMod(true)
opts.SetOmitDefaultPriority(true)
opts.SetOmitDefaultChangeFreq(true)

Since these three fields are largely ignored, this cuts down on the size of the generated XML files.

Reference:

ammark100 commented 1 year ago

Hi, are there any plans to merge it soon?