Describe how to configure uglyURLs per section

This commit is contained in:
Joe Mooring 2024-10-15 07:08:49 -07:00 committed by GitHub
parent cbbd4c4fe8
commit 1ad28e1e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -311,6 +311,14 @@ By default, Hugo produces pretty URLs. To generate ugly URLs, change your site c
uglyURLs = true
{{< /code-toggle >}}
You can also enable uglyURLs by section. For example, with a site that contains sections for books and films:
{{< code-toggle file=hugo >}}
[uglyURLs]
books = true
films = false
{{< /code-toggle >}}
### Post-processing
Hugo provides two mutually exclusive configuration options to alter URLs _after_ it renders a page.

View File

@ -536,7 +536,7 @@ See [module configuration](/hugo-modules/configuration/#module-configuration-imp
###### uglyURLs
(`bool`) When enabled, creates URL of the form `/filename.html` instead of `/filename/`. Default is `false`.
(`bool` or `map`) Whether to generate uglyURLs. Default is `false`. See [details](/content-management/urls/#appearance).
###### watch