How can I remove accents from permalinks?

Hi,

I’m migrating my Hungarian blog from Hexo to Hugo, and I’m trying to set it up in a way so the URLs are preserved. (I don’t really want to bother with the redirects etc. necessary for SEO.) I’m running with the fairly common /:year/:month/:slug/ permalink structure, which produces permalinks like this:

/2018/01/kedvenc-macos-eszközeim-spectacle/

This is almost what I want, but I want to remove eg. the “ö” from the permalink.

Is there a setting for this? I guess I could set post slugs manually, but I would rather not do that for each post. :slight_smile:

Searching for this, I ended up on this thread: Problem with taxonomies in foreign languages. Here the removePathAccents configuration option is mentioned, but I don’t see it in the current documentation, and if I try it out, nothing happens.

if you have a low number of pages

Set the url in frontmatter

or try to change :slug in permalinks to :filename … ???

Yeah, setting the URL in the frontmatter is an option. I have a few hundred posts probably, so this is still a bit uncomfortable - might consider scripting it.

I don’t want to change the permalink structure to include :filename, though, because I’m using page bundles, so in my current setup, the filenames are just index.md :slight_smile:

removePathAccents=true
1 Like

Earlier I’ve been trying this, and it did not work for some reason, but now that I tried again, funnily enough it does… :slight_smile: Thanks!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.