mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 16:01:01 +00:00
438c219892
Be able to inhibit AbsURL canonicalization of content, on a site configuration basis. Advantages of being able to inhibit this include making it easier to rendering on other hostnames, and being able to include resources on http or https depending on how this page was retrieved, avoiding mixed-mode client complaints without adding latency for plain http.
21 lines
710 B
Markdown
21 lines
710 B
Markdown
---
|
|
title: "URLs"
|
|
date: "2014-01-03"
|
|
aliases:
|
|
- "/doc/urls/"
|
|
groups: ["extras"]
|
|
groups_weight: 40
|
|
---
|
|
By default, all relative URLs encountered in the input will be canonicalized
|
|
using `baseurl`, so that a link `/css/foo.css` becomes
|
|
`http://yoursite.example.com/css/foo.css`.
|
|
|
|
Setting `canonifyurls` to `false` will prevent this canonicalization.
|
|
|
|
Benefits of canonicalization include fixing all URLs to be absolute, which may
|
|
aid with some parsing tasks. Note though that all real browsers handle this
|
|
client-side without issues.
|
|
|
|
Benefits of non-canonicalization include being able to have resource inclusion
|
|
be scheme-relative, so that http vs https can be decided based on how this
|
|
page was retrieved.
|