Search code examples
bloggerpermalinkshugo

What is the Hugo permalink format to exactly match the Blogger permalink format?


I am attempting to migrate from Blogger to Hugo hosted on Google App Engine. An example url I am attempting to rebuild:

https://www.darianhickman.com/2017/03/one-year-of-uber-lyft-2016-5300.html

In my config.toml file I am trying:

[permalinks]
  post  = "/:year/:month/:title.html"

It's close but fails. Example Hugo generated url:

http://localhost:1313/2017/03/one-year-of-uber--lyft-2016-5300.html/

Hugo's default behavior is to make posts into folders with an index.html. What do I need to change?


Solution

  • Hugo's default behavior is to make posts into folders with an index.html. What do I need to change?

    In your configuration file (typically named config.toml) you'll need to enable the feature called 'ugly URLs' like so:

    uglyURLs = true
    

    Doing so makes Hugo create URLs in form of /my-post.html. By default, Hugo makes those index.html files you mention for /my-post/ kind of URLs.