Solvedhugo Override section url

Hi all,

I'm building a multilingual site and would like to have 2 different urls for my section list page.

The content is as follows:


Currently, by default, hugo generates /product and /product/product-1 which is expected.

For multilingual purpose, I want to achieve:




I can achieve /produit/produit-1 by permalinks configuration in config.toml but I don't know how to generate /produit one which will still use my section template page under theme/layouts/section/product.html (same for both language).

Any idea would be very appreciated.

Thanks a lot.

P/S: I tried with putting url and slug in and that seems not working although the content of the file is picked up correctly in the template.

This is issue is referenced by this discussion.

25 Answers

✔️Accepted Answer

Just thought I'd chime in and say that this is my single biggest issue using Hugo at the moment, and I think probably the only major roadblock to really powerful multilingual sites.

In my case, I have for example a notes section. In English, I want that section to have the title "Notes", the list page to appear at, and the pages to be at eg.

But, in Japanese, I need that section to have the title 意見 (iken), the list page to appear at and the pages to be at eg.

At the moment, I can get the subpages to have the correct output path (, by using

        notes: /iken/:slug

in my config.yaml, but the list page permalink will still come out at

Even using rewrite rules on Netlify, and throwing some hack-y code into templates and shortlinks using a Param listing these problem sections (ie. index .Site.Params.slugPatches (.Get 0)), I still can't get the permalinks in .Translations to match up.

It means I can't have a URL that makes sense in the target language, and there's no possible workaround that I can find.

On the other hand, if the section's output folder was named after the slug value in the section's frontmatter, just like for single pages, the system would work perfectly (and make a lot of immediate sense). Sections could be correctly translated, and the pages in the sections would have a correctly translated path.

Then, in /content/notes/ I could just put

title: 意見
slug: iken

instead of all those workarounds/.Site.Params/redirect rules.

Other Answers:

@regisphilibert thank you for the example. But sadly this still does not work for sub-sections or scales for multiple sections (as @jonjbar pointed out). The user experience I'd like to see, or I think this thread here is looking for, is described here. In short, it's something around the lines of, the ability to overwrite slug (meaning the part of the url for its specific path level) in its corresponding _index.[$Lang].md front matter.

any news on this?

I have the same issue now, trying to switch to hugo for an existing site. The concept of _index.[lang].md files for sections is great, and it's one of the biggest issues.

Without a doubt, all contributors do an amazing work and I am very thankful for all their effort. I was just citing his own words, which, at least to me, seems to show a bit of an inappropriate attitude in that context.

Regarding .34, I couldn't find any hint of this issue being solved in the release. I already installed the latest release and noticed no difference in the behaviour already described.

Related Issues:

hugo Add a base set of resource filters/processors
re: @budparr I find tools like PurgeCSS or PurifyCSS—which remove unused CSS—pretty valuable ...
hugo The big assets handling / resource transformation funcs naming thread
This looks mighty cool but how about using a shorter namespace than resources? Like asset ...
hugo Override section url
Just thought I'd chime in and say that this is my single biggest issue using Hugo at the moment ...
hugo Add image processing support for WebP image resources
webp is currently not supported I guess that is probably not crystal clear in the documentation and ...
jekyll Jekyll serve fails on Ruby 3.0
I think you want bundle add webrick. My Environment Software Version(s) Operating System Ubuntu 20.0...
vuepress Fix babel useBuiltIns core-js warning
Adding corejs: 3.0.0 in the .babelrc file turned off the warnings. I confirm that this is an issue r...
jekyll Cannot install Jekyll on MacOS Mojave
I cannot I used Jekyll on my MacBook Pro without any problem in the previous version of MacOS I upda...
jekyll unable to build a jekyll site … invalid date
I've solved it! It seems that you need to place the line exclude: [vendor] in _config.yml found this...
vuepress vuepress dev: throws res.getHeader() is not a function
The dependency chain is webpack-serve -> koa-webpack -> webpack-dev-middleware and it's caused by th...
jekyll Jekyll 4.0 Ideas
Please please support for i18n At least 2 languages Many plug-ins break or don't work with ghpages. ...
vuepress Blog Support roadmap (Resolved)
RSS/JSON Feed Draft post Ability to eliminates the .html extension Split date into subdirs: blog/201...
vuepress Hot reload not working
watchpack: 1.6.1 I noticed that the webpack hot update plugin watchpack is now 1.7.2 I compared the ...
vuepress Option to automatically list sub-directory in the sidebar
I like this idea too To be honest that's what I expected to happen I've got a docs/components folder...
eleventy Slug filter doesn't create url safe slugs.
yup @zachleat it does replace the slug so I just do remove some chars to make it little bit prettier...
vuepress Automatic Reload not working?
I got it working by downgrading dependency watchpack to 1.6.1 Added resolutions section to package.j...
eleventy Official Asset Pipeline
I've been using a stylesheet.11ty.js template file to compile CSS (via postcss in my case) I have an...
vuepress Unknown Custom Element - <v-#####>
@davision A quick fix for this issue in enhanceApp.js (for 1.0.0-alpha.42): This will (I think) fix ...
jekyll bundler: failed to load command: jekyll
Found this previous issue - ffi/ffi#368 The following fixed my problem: Got it working now! For thos...
eleventy How to create sitemap.xml?
Hi @rolandtoth I’ve created one for my (yet un-launched) site You can use the following template (th...
eleventy Eleventy reusable components shortcode
Thanks for thinking out loud here this is super helpful feedback to see what you’re trying to do May...
jekyll jekyll install leads to immediate errors
Something that's not clearly stated in our docs: Running Jekyll commands with recent versions ...
wowchemy hugo themes TOC for blog posts
@CarlosVecina Change the file <root dir>/layouts/_default/single.html as follows: and add the follow...
vuepress [Proposal] Plugin API
I actually prefer a simple object-based API as @ycmjason suggested Background Hey guys ...
vuepress Has anyone gotten mermaid working?
This is how I got it working on mermaid v7.1.2 and vuepress v0.14.0 And my looks like: ⚠️ ...
jekyll Blank new blog generated with Jekyll-3.2.1 on Windows
Temporary Fix I have traced that missing drive letter to site.in_theme_dir(base ...
blogdown Problem with blogdown::new_site using starter-hugo-academic
Should be fixed now Please try the development version of blogdown: Thanks! I have posted this issue...
eleventy getting data from a .json file in node_modules
Thanks @robb0wen Your example made to try and swap to styles.colour.propert...
jekyll jekyll 3.8.3 | Error: uninitialized constant FFI::Platform::CPU
Hmm. this is indeed frustrating Looks like you'll have to resort to setting up local bundles for eve...
blogdown Hugo generated .Summary lacks manual cut-off in .Rmd
It looks like Blogdown knits to html although the partials are properly processed features like summ...
eleventy Is it possible to paginate collection data?
To answer your second question @paulrobertlloyd the permalink front matter key can use template synt...
assemble yfm in partials doesn't work
Since you're using the built-in Handlebars syntax for the partial: {{> foo }} assemble does not merg...
jekyll Defaults: Path scope with subfolders
After a bit of testing it seems like it won't work if the value for path scope ends with a slash So ...
blogdown blogdown:::serve_site() keeps opening new browser tabs
@denizCvrl Thank you soooo much! By running blogdown::serve_site() multiple times ...
blogdown Getting started with Wowchemy
@apreshill If you are using the latest dev version of blogdown In the it says: When creating...
apostrophe PayloadTooLargeError: request entity too large when trying to POST to apostrophe-headless API
This seems to have worked: I am using apostrophe-headless and my payloads are slightly big since I a...
strapi 👉 Question: What are the main pain points you have using Strapi? (Episode 3)
Pain point Issue: No TypeScript support Context: I know it has been mentioned as something the team ...
drupal vm Composer install fails without proper swap
or you can create a swap file sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /s...
keystone classic Heroku Deployment - Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Found the issue! I removed this from my package.json When Heroku uses the default node version it wo...
Ghost using https in config.js causes "to many redirects"
Chris is correct Here is a working Nginx configuration: when im using this ...
strapi New project fails to connect to database
I had the same issue with 3.0.0-alpha.10 I ran strapi new project-name then when it prompts to enter...
ponzu no go files in /home/user/go/src/
try running go get -u via copy / paste that exact command. ...
strapi Refresh JWT route
This is quite important for my app So I implement it by extending plugin (for temporary use) Here's ...
joomla cms Unknown column 'client_id' in 'where clause
The solution is to use phpMyadmin and run these queries Replace #_ by your db prefix ...
netlify cms Support for multilingual content authoring
So I can see from #2988 that we're still looking for UI/UX solutions on this Thanks @barthc for the ...
Ghost Editor: IME input problem
@buchijiang whenever the upstream issue (bustle/mobiledoc-kit#548) is solved - there's no explicit t...
drupal vm Failing to install Drupal on macOS High Sierra - NFS filesystem issues
@ajhoddinott OMG That works thank you! For explicit instructions on Mac OS High Sierra open the app ...
PrestaShop The left menu in BO disappeared after upgrade to
Hi @photinia73 @StraitsKapitan Do not rename the column active Status: Tech investigation still need...
october Reorder of records in relation
@canthis thank you very much the references you gave pointed me in the right direction and I was abl...
netlify cms Authentication problem if not running on localhost
I have the same issue with GitHub backend I can access the content manager just normal when running ...
netlify cms Add sorting ability to list of entries
Requesting some more flexibility here User needs: to more efficiently be able to locate a post when ...