docs: canonifyURLs is unnessessary

This commit is contained in:
Sören Weber 2024-02-24 13:49:46 +01:00
parent 06637ff16f
commit 26f58b7d92
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 9 additions and 13 deletions

View file

@ -3,17 +3,12 @@
# set it like "https://example.com/mysite/"
baseURL = "https://example.com/"
# canonicalization will only be used for the sitemap.xml and index.xml files;
# if set to false, a site served from a subdirectory will generate wrong links
# inside of the above mentioned files; if you serve the page from the servers root
# you are free to set the value to false as recommended by the official Hugo documentation
canonifyURLs = true # true -> all relative URLs would instead be canonicalized using baseURL
# required value to serve this page from a webserver AND the file system;
# if you don't want to serve your page from the file system, you can also set this value
# to false
relativeURLs = true # true -> rewrite all relative URLs to be relative to the current content
# if you set uglyURLs to false, this theme will append 'index.html' to any branch bundle link
# so your page can be also served from the file system; if you don't want that,
relativeURLs = false # true -> rewrite all site-relative URLs (those with a leading slash) to be relative to the current content
# if you set uglyURLs to false, this theme will append 'index.html' to any page bundle link
# so your site can be also served from the file system; if you don't want that,
# set disableExplicitIndexURLs=true in the [params] section
uglyURLs = false # true -> basic/index.html -> basic.html

View file

@ -9,11 +9,8 @@ If your site is served from a subfolder, eg. `https://example.com/mysite/`, you
````toml
baseURL = "https://example.com/mysite/"
canonifyURLs = true
relativeURLs = true
````
Without `canonifyURLs=true` URLs in sublemental pages (like `sitemap.xml`, `rss.xml`) will be generated falsly while your HTML files will still work. See https://github.com/gohugoio/hugo/issues/5226.
## Serving your page from the filesystem
@ -31,7 +28,11 @@ The theme will append an additional `index.html` to all page bundle links by def
````
{{% notice note %}}
If you want to use the search feature from the file system using an older installation of the theme make sure to change your outputformat for the homepage from the now deprecated `json` to `search` [as seen below](#activate-search).
Sublemental pages (like `sitemap.xml`, `rss.xml`) will always be generated with fully quallyfied URLs and will not work if your site is served from the filesystem.
{{% /notice %}}
{{% notice note %}}
If you want to use the search feature from the file system, migrating from an older installation of the theme, make sure to change your outputformat for the homepage from the now deprecated `json` to `search` [as seen below](#activate-search).
{{% /notice %}}
## Activate search

View file

@ -703,7 +703,7 @@ This document shows you what's new in the latest release and flags it with one o
## 2.6.0 (2021-10-21) {#260}
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Your site can now be served from a subfolder if you set `baseURL` and `canonifyURLs=true` in your `hugo.toml`. See the [documentation](basics/customization#serving-your-page-from-a-subfolder) for a detailed example.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Your site can now be served from a subfolder if you set `baseURL` in your `hugo.toml`. See the [documentation](basics/customization#serving-your-page-from-a-subfolder) for a detailed example.
---