fix mistake with images in sitemap

fix-sitemap-lib
Rob Loranger 5 years ago
parent f02a241213
commit dd2a5840ec
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
  1. 8
      sitemap.go

@ -83,11 +83,11 @@ func handleViewSitemap(app *App, w http.ResponseWriter, r *http.Request) error {
{"lastmod", p.Updated},
}
if len(p.Images) > 0 {
imgs := stm.URL{}
imgs := []stm.URL{}
for _, i := range p.Images {
imgs = append(imgs, []interface{}{
[]interface{}{"loc", i},
[]interface{}{"title", ""},
imgs = append(imgs, stm.URL{
{"loc", i},
{"title", ""},
})
}
u = append(u, []interface{}{"image", imgs})

Loading…
Cancel
Save