Skip to content

Commit

Permalink
config/allconfig: Deprecate :filename and :slugorfilename tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored and bep committed Feb 17, 2025
1 parent 7b7a0f3 commit 5de3913
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/allconfig/allconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5de3913

Please sign in to comment.