diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go index 3021028fdfd..af841fb5458 100644 --- a/config/allconfig/allconfig.go +++ b/config/allconfig/allconfig.go @@ -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,