mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
committed by
Bjørn Erik Pedersen
parent
931e096f21
commit
7f3061723e
@@ -1881,11 +1881,19 @@ func (sa *sitePagesAssembler) addStandalonePages() error {
|
||||
}
|
||||
|
||||
if sitemapEnabled {
|
||||
addStandalone("/_sitemap", kinds.KindSitemap, output.SitemapFormat)
|
||||
skipSitemapIndex := s.Conf.IsMultihost() || !(s.Conf.DefaultContentLanguageInSubdir() || s.Conf.IsMultilingual())
|
||||
of := output.SitemapFormat
|
||||
if s.conf.Sitemap.Filename != "" {
|
||||
of.BaseName = paths.Filename(s.conf.Sitemap.Filename)
|
||||
}
|
||||
addStandalone("/_sitemap", kinds.KindSitemap, of)
|
||||
|
||||
skipSitemapIndex := s.Conf.IsMultihost() || !(s.Conf.DefaultContentLanguageInSubdir() || s.Conf.IsMultilingual())
|
||||
if !skipSitemapIndex {
|
||||
addStandalone("/_sitemapindex", kinds.KindSitemapIndex, output.SitemapIndexFormat)
|
||||
of = output.SitemapIndexFormat
|
||||
if s.conf.Sitemap.Filename != "" {
|
||||
of.BaseName = paths.Filename(s.conf.Sitemap.Filename)
|
||||
}
|
||||
addStandalone("/_sitemapindex", kinds.KindSitemapIndex, of)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user