From 7bc92678e9376b1ec6e7ac3baa5b8c5004218a8e Mon Sep 17 00:00:00 2001 From: Guillermo Guerrero Date: Mon, 7 Jul 2025 22:39:35 +0200 Subject: [PATCH] Fixed deprecation WARN deprecated: the ":filename" permalink token was deprecated in Hugo 0.144.0 and will be removed in a future release. Use ":contentbasename" instead. --- exampleSite/content/blog/creating-a-new-theme.md | 2 +- exampleSite/hugo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/blog/creating-a-new-theme.md b/exampleSite/content/blog/creating-a-new-theme.md index 233b2935f..d5f92f826 100644 --- a/exampleSite/content/blog/creating-a-new-theme.md +++ b/exampleSite/content/blog/creating-a-new-theme.md @@ -991,7 +991,7 @@ Knowing that hugo is using the slug to generate the file name, the simplest solu $ vi config.toml [permalinks] page = "/:title/" - about = "/:filename/" + about = "/:contentbasename/" ``` Generate the web site and verify that this didn't work. Hugo lets "slug" or "URL" override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place. diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index 28cbdc1e0..b07cb9f80 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -470,7 +470,7 @@ pluralizelisttitles = false """ [permalinks] - blog = "/blog/:year/:month/:day/:filename/" + blog = "/blog/:year/:month/:day/:contentbasename/" # Enable or disable top bar with social icons [params.topbar]