Skip to content
Permalink
Browse files

hugolib: Deprecate .Site.Ref and .Site.RelRef

Fixes #5386
  • Loading branch information...
bep committed Nov 1, 2018
1 parent 1d18eb0 commit 6c6a6c87ec2b5ac7342e268ab47861429230f7f4
Showing with 4 additions and 0 deletions.
  1. +4 −0 hugolib/site.go
@@ -583,6 +583,8 @@ func (s *siteRefLinker) refLink(ref string, source interface{}, relative bool, o

// Ref will give an absolute URL to ref in the given Page.
func (s *SiteInfo) Ref(ref string, page *Page, options ...string) (string, error) {
// Remove in Hugo 0.53
helpers.Deprecated("Site", ".Ref", "Use .Site.GetPage", false)
outputFormat := ""
if len(options) > 0 {
outputFormat = options[0]
@@ -593,6 +595,8 @@ func (s *SiteInfo) Ref(ref string, page *Page, options ...string) (string, error

// RelRef will give an relative URL to ref in the given Page.
func (s *SiteInfo) RelRef(ref string, page *Page, options ...string) (string, error) {
// Remove in Hugo 0.53
helpers.Deprecated("Site", ".RelRef", "Use .Site.GetPage", false)
outputFormat := ""
if len(options) > 0 {
outputFormat = options[0]

0 comments on commit 6c6a6c8

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.