Skip to content
Permalink
Browse files

add sitemapsPath to the final URL in the sitemap index

  • Loading branch information...
gadelkareem committed Apr 25, 2018
1 parent e3c3d37 commit 4b784b1f05800b799b98452fcee21ddc20cc4d40
Showing with 2 additions and 4 deletions.
  1. +2 −4 stm/location.go
@@ -58,12 +58,10 @@ func (loc *Location) PathInPublic() string {
func (loc *Location) URL() string {
base, _ := url.Parse(loc.opts.SitemapsHost())

var u *url.URL
for _, ref := range []string{
loc.opts.sitemapsPath, loc.Filename(),
loc.opts.sitemapsPath + "/", loc.Filename(),
} {
u, _ = url.Parse(ref)
base = base.ResolveReference(u)
base, _ = base.Parse(ref)
}

return base.String()

0 comments on commit 4b784b1

Please sign in to comment.
You can’t perform that action at this time.