UglyURLS = true, results in conflict which requires workaround for directory /content/directory/ level files of "legacy" sites

It turns out you can accomplish this via site configuration.

baseURL = "http://example.org/"
languageCode = "en-us"
title = "@@TITLE@@"

uglyURLs = true

[outputFormats]
[outputFormats.html-pretty-urls]
mediaType = "text/html"
isHTML = true
noUgly = true

[outputs]
section =   ["HTML-PRETTY-URLS", "RSS"]
taxonomy =  ["HTML-PRETTY-URLS", "RSS"]
term =      ["HTML-PRETTY-URLS", "RSS"]

You don’t need to create additional templates, and you don’t need to change front matter anywhere.

I only spent a couple of minutes testing this, so caveat emptor.

4 Likes