mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
1 file changed
+4
@@ -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.
|
// Ref will give an absolute URL to ref in the given Page.
|
||||||
func (s *SiteInfo) Ref(ref string, page *Page, options ...string) (string, error) {
|
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 := ""
|
outputFormat := ""
|
||||||
if len(options) > 0 {
|
if len(options) > 0 {
|
||||||
outputFormat = 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.
|
// RelRef will give an relative URL to ref in the given Page.
|
||||||
func (s *SiteInfo) RelRef(ref string, page *Page, options ...string) (string, error) {
|
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 := ""
|
outputFormat := ""
|
||||||
if len(options) > 0 {
|
if len(options) > 0 {
|
||||||
outputFormat = options[0]
|
outputFormat = options[0]
|
||||||
|
|||||||
Reference in new issue
Block a user