Skip to content

Commit

Permalink
hugolib: Remove .Site.Ref/RelRef
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Nov 25, 2019
1 parent 33d7333 commit 69fd1c6
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,30 +791,6 @@ func (s *siteRefLinker) refLink(ref string, source interface{}, relative bool, o
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 {
return s.h != nil && s.h.running
}
Expand Down

0 comments on commit 69fd1c6

Please sign in to comment.