Skip to content

Commit fd15e03

Browse files
committed
fix: remove image from sitemap
1 parent a9f521c commit fd15e03

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/wp-go-static/commands/sitemap.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ func sitemapCmdF(command *cobra.Command, args []string) error {
6363
for _, option := range optionList {
6464
smap.URL[i].Loc = strings.ReplaceAll(smap.URL[i].Loc, option, config.Sitemap.ReplaceURL)
6565

66-
for j := range smap.URL[i].Image {
67-
smap.URL[i].Image[j].Loc = strings.ReplaceAll(smap.URL[i].Image[j].Loc, option, config.Sitemap.ReplaceURL)
68-
}
66+
// for j := range smap.URL[i].Image {
67+
// smap.URL[i].Image[j].Loc = strings.ReplaceAll(smap.URL[i].Image[j].Loc, option, config.Sitemap.ReplaceURL)
68+
// }
6969
}
7070
}
7171
}

pkg/sitemap/sitemap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type URL struct {
3737
LastMod string `xml:"lastmod,omitempty"`
3838
ChangeFreq string `xml:"changefreq,omitempty"`
3939
Priority float32 `xml:"priority,omitempty"`
40-
Image []Image `xml:"image,omitempty"`
40+
// Image []Image `xml:"image,omitempty"`
4141
}
4242

4343
// Image is a structure of <image> in <url>

0 commit comments

Comments
 (0)