mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
config/allconfig: Deprecate :filename and :slugorfilename tokens
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
7b7a0f3624
commit
5de3913ed4
@@ -427,6 +427,15 @@ func (c *Config) CompileConfig(logger loggers.Logger) error {
|
|||||||
c.Services.X.DisableInlineCSS = c.Services.Twitter.DisableInlineCSS
|
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{
|
c.C = &ConfigCompiled{
|
||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
BaseURL: baseURL,
|
BaseURL: baseURL,
|
||||||
|
Reference in New Issue
Block a user