mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
hugolib: Remove Site.HomeAbsURL
It's not in use and after #12266 it's also not corret to use on its own (use .Site.Home.Permalink).
This commit is contained in:
parent
ba03114aa9
commit
558f74f009
1 changed files with 3 additions and 8 deletions
|
@ -598,18 +598,13 @@ func (h *HugoSites) fileEventsContentPaths(p []pathChange) []pathChange {
|
||||||
return keepers
|
return keepers
|
||||||
}
|
}
|
||||||
|
|
||||||
// HomeAbsURL is a convenience method giving the absolute URL to the home page.
|
// SitemapAbsURL is a convenience method giving the absolute URL to the sitemap.
|
||||||
func (s *Site) HomeAbsURL() string {
|
func (s *Site) SitemapAbsURL() string {
|
||||||
base := ""
|
base := ""
|
||||||
if len(s.conf.Languages) > 1 || s.Conf.DefaultContentLanguageInSubdir() {
|
if len(s.conf.Languages) > 1 || s.Conf.DefaultContentLanguageInSubdir() {
|
||||||
base = s.Language().Lang
|
base = s.Language().Lang
|
||||||
}
|
}
|
||||||
return s.AbsURL(base, false)
|
p := s.AbsURL(base, false)
|
||||||
}
|
|
||||||
|
|
||||||
// SitemapAbsURL is a convenience method giving the absolute URL to the sitemap.
|
|
||||||
func (s *Site) SitemapAbsURL() string {
|
|
||||||
p := s.HomeAbsURL()
|
|
||||||
if !strings.HasSuffix(p, "/") {
|
if !strings.HasSuffix(p, "/") {
|
||||||
p += "/"
|
p += "/"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue