config/allconfig: Deprecate :filename and :slugorfilename tokens
This commit is contained in:
parent
7b7a0f3624
commit
5de3913ed4
1 changed files with 9 additions and 0 deletions
|
@ -427,6 +427,15 @@ func (c *Config) CompileConfig(logger loggers.Logger) error {
|
|||
c.Services.X.DisableInlineCSS = c.Services.Twitter.DisableInlineCSS
|
||||
}
|
||||
|
||||
// Legacy permalink tokens
|
||||
vs := fmt.Sprintf("%v", c.Permalinks)
|
||||
if strings.Contains(vs, ":filename") {
|
||||
hugo.Deprecate("the \":filename\" permalink token", "Use \":contentbasename\" instead.", "0.144.0")
|
||||
}
|
||||
if strings.Contains(vs, ":slugorfilename") {
|
||||
hugo.Deprecate("the \":slugorfilename\" permalink token", "Use \":slugorcontentbasename\" instead.", "0.144.0")
|
||||
}
|
||||
|
||||
c.C = &ConfigCompiled{
|
||||
Timeout: timeout,
|
||||
BaseURL: baseURL,
|
||||
|
|
Loading…
Add table
Reference in a new issue