summaryrefslogtreecommitdiffstats
path: root/hugolib/page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-25 16:09:56 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commitee75e2999b66bd9f258a241c487b6677cf2fa071 (patch)
treec819912b6f68b4d6f96f22a40dab81893ba21984 /hugolib/page.go
parent15b64d51da48807c5f896f17b33d8c0d054c9461 (diff)
Remove the now superflous defaultExtension
And some other unsed fields and methods.
Diffstat (limited to 'hugolib/page.go')
-rw-r--r--hugolib/page.go24
1 files changed, 3 insertions, 21 deletions
diff --git a/hugolib/page.go b/hugolib/page.go
index 36c89d958..11754fb5f 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -244,7 +244,6 @@ type pageInit struct {
plainInit sync.Once
plainWordsInit sync.Once
renderingConfigInit sync.Once
- pageURLInit sync.Once
}
// IsNode returns whether this is an item of one of the list types in Hugo,
@@ -764,15 +763,9 @@ func (p *Page) analyzePage() {
}
func (p *Page) Extension() string {
- if p.extension != "" {
- // TODO(bep) output remove/deprecate this
- return p.extension
- }
- //
- // TODO(bep) return MediaType.Suffix
-
- // TODO(bep) remove this config option =>
- return p.s.Cfg.GetString("defaultExtension")
+ // Remove in Hugo 0.22.
+ helpers.Deprecated("Page", "Extension", "See OutputFormats with its MediaType", false)
+ return p.extension
}
// AllTranslations returns all translations, including the current Page.
@@ -1696,17 +1689,6 @@ func (p *Page) addLangPathPrefixIfFlagSet(outfile string, should bool) string {
return outfile
}
-func (p *Page) addLangFilepathPrefix(outfile string) string {
- if outfile == "" {
- outfile = helpers.FilePathSeparator
- }
-
- if !p.shouldAddLanguagePrefix() {
- return outfile
- }
- return helpers.FilePathSeparator + filepath.Join(p.Lang(), outfile)
-}
-
func sectionsFromFilename(filename string) []string {
var sections []string
dir, _ := filepath.Split(filename)