]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
hugolib: Remove Site.HomeAbsURL
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 16 Mar 2024 11:08:30 +0000 (12:08 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 16 Mar 2024 11:49:40 +0000 (12:49 +0100)
It's not in use and after #12266 it's also not corret to use on its own (use .Site.Home.Permalink).

hugolib/site.go

index 2275dbe8415ee5cbdad752ed81c62d6d23db2541..6d2d6c852813dce4170887fce99b82e4c45755cf 100644 (file)
@@ -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 += "/"
        }