mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Add canonifyurls
config option.
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.
This commit is contained in:
@@ -36,6 +36,7 @@ type Config struct {
|
||||
Params map[string]interface{}
|
||||
Permalinks PermalinkOverrides
|
||||
BuildDrafts, UglyUrls, Verbose bool
|
||||
CanonifyUrls bool
|
||||
}
|
||||
|
||||
var c Config
|
||||
@@ -61,6 +62,7 @@ func SetupConfig(cfgfile *string, path *string) *Config {
|
||||
c.BuildDrafts = false
|
||||
c.UglyUrls = false
|
||||
c.Verbose = false
|
||||
c.CanonifyUrls = true
|
||||
|
||||
c.readInConfig()
|
||||
|
||||
|
Reference in New Issue
Block a user