Is Hugo support these functionalities that Jekyll Support?

I am thinking to migrate my blog from jekyll to hugo, but I like to know about hugo facility.

I am using jekyll because of two reason.

  1. Custom permalink

I can set custom permalink for any post or page in front matter like this

Permalink: /subdirecory1/subdirecory2/my-post/       //Post 1 permalink
Permalink: /subdirecory/the-post/                    //Post 2 permalink

Can I set my custom permalink in front matter for any post with hugo?

  1. Custom Layout

I am using custom layout for specific post in my front matter, for example

Layout: Post
Layout: NoAds
Layout: WiKi
Layout: Directory
Layout: Tools

I am using these type of layouts because, I am posting different kind of content in my blog, so these type of layout help me, to display specific sidebar for specific blog post. So Can I do the same thing with hugo?

Any suggestion is really appreciate for me.


Yes – can set type or explicit layout in front matter, see

Can you please give me an example of permalink, I have set permalink in my front matter, but it is not working, I have also mention Ugly URL true in my config file, but still it is not working.

@bep would know best, but I am setting it in the config file per and adjusting slug and title in the frontmatter.

Permalink for a given page would be the url. This is all in the documentation, noo need for any guessing.

Thank you so much @bep URL is worked, But When I change my URL,

for example to

Then both are available in localhost, in reality, I changed my URL then why OLD URL still working, why it does not show me 404 error?

I see, the public folder, and find out, both files are there, so did you not think, it will cause problem about duplicate issue.

ah, url in frontmatter. I did not know that one. Thanks!