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}, {"lastmod", p.Updated},
} }
if len(p.Images) > 0 { if len(p.Images) > 0 {
imgs := stm.URL{} imgs := []stm.URL{}
for _, i := range p.Images { for _, i := range p.Images {
imgs = append(imgs, []interface{}{ imgs = append(imgs, stm.URL{
[]interface{}{"loc", i}, {"loc", i},
[]interface{}{"title", ""}, {"title", ""},
}) })
} }
u = append(u, []interface{}{"image", imgs}) u = append(u, []interface{}{"image", imgs})

Loading…
Cancel
Save