mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
hugolib: Remove .Site.Ref/RelRef
This commit is contained in:
parent
33d733300a
commit
69fd1c60d8
1 changed files with 0 additions and 24 deletions
|
@ -791,30 +791,6 @@ func (s *siteRefLinker) refLink(ref string, source interface{}, relative bool, o
|
||||||
return link, nil
|
return link, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ref will give an absolute URL to ref in the given Page.
|
|
||||||
func (s *SiteInfo) Ref(ref string, page page.Page, options ...string) (string, error) {
|
|
||||||
// Remove in Hugo 0.54
|
|
||||||
helpers.Deprecated(".Site.Ref", "Use .Site.GetPage", true)
|
|
||||||
outputFormat := ""
|
|
||||||
if len(options) > 0 {
|
|
||||||
outputFormat = options[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
return s.s.refLink(ref, page, false, outputFormat)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RelRef will give an relative URL to ref in the given Page.
|
|
||||||
func (s *SiteInfo) RelRef(ref string, page page.Page, options ...string) (string, error) {
|
|
||||||
// Remove in Hugo 0.54
|
|
||||||
helpers.Deprecated(".Site.RelRef", "Use .Site.GetPage", true)
|
|
||||||
outputFormat := ""
|
|
||||||
if len(options) > 0 {
|
|
||||||
outputFormat = options[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
return s.s.refLink(ref, page, true, outputFormat)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Site) running() bool {
|
func (s *Site) running() bool {
|
||||||
return s.h != nil && s.h.running
|
return s.h != nil && s.h.running
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue