Skip to content

Commit

Permalink
fix: remove image from sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotuna committed Nov 11, 2023
1 parent a9f521c commit fd15e03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/wp-go-static/commands/sitemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ func sitemapCmdF(command *cobra.Command, args []string) error {
for _, option := range optionList {
smap.URL[i].Loc = strings.ReplaceAll(smap.URL[i].Loc, option, config.Sitemap.ReplaceURL)

for j := range smap.URL[i].Image {
smap.URL[i].Image[j].Loc = strings.ReplaceAll(smap.URL[i].Image[j].Loc, option, config.Sitemap.ReplaceURL)
}
// for j := range smap.URL[i].Image {
// smap.URL[i].Image[j].Loc = strings.ReplaceAll(smap.URL[i].Image[j].Loc, option, config.Sitemap.ReplaceURL)
// }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sitemap/sitemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type URL struct {
LastMod string `xml:"lastmod,omitempty"`
ChangeFreq string `xml:"changefreq,omitempty"`
Priority float32 `xml:"priority,omitempty"`
Image []Image `xml:"image,omitempty"`
// Image []Image `xml:"image,omitempty"`
}

// Image is a structure of <image> in <url>
Expand Down

0 comments on commit fd15e03

Please sign in to comment.