Skip to content

Commit

Permalink
hugolib: Deprecate .Site.Ref and .Site.RelRef
Browse files Browse the repository at this point in the history
Fixes #5386
  • Loading branch information
bep committed Nov 1, 2018
1 parent 1d18eb0 commit 6c6a6c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down

0 comments on commit 6c6a6c8

Please sign in to comment.