diff options
author | Joe Mooring <[email protected]> | 2024-02-01 07:33:49 -0800 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-01 17:12:52 +0100 |
commit | 963cecc12c9eae8112cebfa941f5c1bc25ab22a4 (patch) | |
tree | 3f8bf546b189eecce2a7d100edb59a10e4139bf0 /source | |
parent | d8f0e3071558f948b41b64bb514a01b62742a60a (diff) | |
download | hugo-963cecc12c9eae8112cebfa941f5c1bc25ab22a4.tar.gz hugo-963cecc12c9eae8112cebfa941f5c1bc25ab22a4.zip |
all: Deprecate .Page.Lang and .Page.File.Lang
Use .Page.Language.Lang instead.
Diffstat (limited to 'source')
-rw-r--r-- | source/fileInfo.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/fileInfo.go b/source/fileInfo.go index 5b24bbeb2..20ddda647 100644 --- a/source/fileInfo.go +++ b/source/fileInfo.go @@ -51,17 +51,19 @@ func (fi *File) Dir() string { } // Extension is an alias to Ext(). +// Deprecated: Use Ext() instead. func (fi *File) Extension() string { hugo.Deprecate(".File.Extension", "Use .File.Ext instead.", "v0.96.0") return fi.Ext() } // Ext returns a file's extension without the leading period (e.g. "md"). -// Deprecated: Use Extension() instead. func (fi *File) Ext() string { return fi.p().Ext() } // Lang returns a file's language (e.g. "sv"). +// Deprecated: use .Page.Language.Lang instead. func (fi *File) Lang() string { + hugo.Deprecate(".Page.File.Lang", "Use .Page.Language.Lang instead.", "v0.123.0") return fi.fim.Meta().Lang } |