Skip to content

Commit

Permalink
hugolib: Remove Site.HomeAbsURL
Browse files Browse the repository at this point in the history
It's not in use and after #12266 it's also not corret to use on its own (use .Site.Home.Permalink).
  • Loading branch information
bep committed Mar 16, 2024
1 parent ba03114 commit 558f74f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions hugolib/site.go
Expand Up @@ -598,18 +598,13 @@ func (h *HugoSites) fileEventsContentPaths(p []pathChange) []pathChange {
return keepers
}

// HomeAbsURL is a convenience method giving the absolute URL to the home page.
func (s *Site) HomeAbsURL() string {
// SitemapAbsURL is a convenience method giving the absolute URL to the sitemap.
func (s *Site) SitemapAbsURL() string {
base := ""
if len(s.conf.Languages) > 1 || s.Conf.DefaultContentLanguageInSubdir() {
base = s.Language().Lang
}
return s.AbsURL(base, false)
}

// SitemapAbsURL is a convenience method giving the absolute URL to the sitemap.
func (s *Site) SitemapAbsURL() string {
p := s.HomeAbsURL()
p := s.AbsURL(base, false)
if !strings.HasSuffix(p, "/") {
p += "/"
}
Expand Down

0 comments on commit 558f74f

Please sign in to comment.