github.com/graemephi/kahugo@v0.62.3-0.20211121071557-d78c0423784d/resources/page/page_wrappers.autogen.go (about)

     1  // Copyright 2019 The Hugo Authors. All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  // http://www.apache.org/licenses/LICENSE-2.0
     7  //
     8  // Unless required by applicable law or agreed to in writing, software
     9  // distributed under the License is distributed on an "AS IS" BASIS,
    10  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  // This file is autogenerated.
    15  
    16  package page
    17  
    18  import (
    19  	"github.com/gohugoio/hugo/common/hugo"
    20  	"github.com/gohugoio/hugo/helpers"
    21  	"github.com/gohugoio/hugo/hugofs"
    22  	"html/template"
    23  )
    24  
    25  // NewDeprecatedWarningPage adds deprecation warnings to the given implementation.
    26  func NewDeprecatedWarningPage(p DeprecatedWarningPageMethods) DeprecatedWarningPageMethods {
    27  	return &pageDeprecated{p: p}
    28  }
    29  
    30  type pageDeprecated struct {
    31  	p DeprecatedWarningPageMethods
    32  }
    33  
    34  func (p *pageDeprecated) Filename() string {
    35  	helpers.Deprecated("Page.Filename", "Use .File.Filename", false)
    36  	return p.p.Filename()
    37  }
    38  func (p *pageDeprecated) Dir() string {
    39  	helpers.Deprecated("Page.Dir", "Use .File.Dir", false)
    40  	return p.p.Dir()
    41  }
    42  func (p *pageDeprecated) IsDraft() bool {
    43  	helpers.Deprecated("Page.IsDraft", "Use .Draft.", false)
    44  	return p.p.IsDraft()
    45  }
    46  func (p *pageDeprecated) Extension() string {
    47  	helpers.Deprecated("Page.Extension", "Use .File.Extension", false)
    48  	return p.p.Extension()
    49  }
    50  func (p *pageDeprecated) Hugo() hugo.Info {
    51  	helpers.Deprecated("Page.Hugo", "Use the global hugo function.", false)
    52  	return p.p.Hugo()
    53  }
    54  func (p *pageDeprecated) Ext() string {
    55  	helpers.Deprecated("Page.Ext", "Use .File.Ext", false)
    56  	return p.p.Ext()
    57  }
    58  func (p *pageDeprecated) LanguagePrefix() string {
    59  	helpers.Deprecated("Page.LanguagePrefix", "Use .Site.LanguagePrefix.", false)
    60  	return p.p.LanguagePrefix()
    61  }
    62  func (p *pageDeprecated) GetParam(arg0 string) interface{} {
    63  	helpers.Deprecated("Page.GetParam", "Use .Param or .Params.myParam.", false)
    64  	return p.p.GetParam(arg0)
    65  }
    66  func (p *pageDeprecated) LogicalName() string {
    67  	helpers.Deprecated("Page.LogicalName", "Use .File.LogicalName", false)
    68  	return p.p.LogicalName()
    69  }
    70  func (p *pageDeprecated) BaseFileName() string {
    71  	helpers.Deprecated("Page.BaseFileName", "Use .File.BaseFileName", false)
    72  	return p.p.BaseFileName()
    73  }
    74  func (p *pageDeprecated) RSSLink() template.URL {
    75  	helpers.Deprecated("Page.RSSLink", "Use the Output Format's link, e.g. something like:\n    {{ with .OutputFormats.Get \"RSS\" }}{{ .RelPermalink }}{{ end }}", false)
    76  	return p.p.RSSLink()
    77  }
    78  func (p *pageDeprecated) TranslationBaseName() string {
    79  	helpers.Deprecated("Page.TranslationBaseName", "Use .File.TranslationBaseName", false)
    80  	return p.p.TranslationBaseName()
    81  }
    82  func (p *pageDeprecated) URL() string {
    83  	helpers.Deprecated("Page.URL", "Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url", false)
    84  	return p.p.URL()
    85  }
    86  func (p *pageDeprecated) ContentBaseName() string {
    87  	helpers.Deprecated("Page.ContentBaseName", "Use .File.ContentBaseName", false)
    88  	return p.p.ContentBaseName()
    89  }
    90  func (p *pageDeprecated) UniqueID() string {
    91  	helpers.Deprecated("Page.UniqueID", "Use .File.UniqueID", false)
    92  	return p.p.UniqueID()
    93  }
    94  func (p *pageDeprecated) FileInfo() hugofs.FileMetaInfo {
    95  	helpers.Deprecated("Page.FileInfo", "Use .File.FileInfo", false)
    96  	return p.p.FileInfo()
    97  }