Browse Source

fix mistake with images in sitemap

fix-sitemap-lib
Rob Loranger 4 years ago
parent
commit
dd2a5840ec
No known key found for this signature in database GPG Key ID: D6F1633A4F0903B8
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      sitemap.go

+ 4
- 4
sitemap.go View File

@@ -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