mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
25c7c18f9f
The slugorcontentbasename permalink token was creating an extra subdirectory for section pages (_index.md files). This was because pageToPermalinkContentBaseName did not have the same special handling for _index.md files as pageToPermalinkFilename. This commit adds the special handling to return an empty string for section pages, ensuring backward compatibility with slugorfilename. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Fixes #14104