diff options
author | Phil Pennock <pdp@spodhuis.org> | 2014-01-03 18:36:53 -0500 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2014-01-13 10:06:12 -0500 |
commit | 438c2198923022a3e4d299b06a7df18268041dd8 (patch) | |
tree | 2e0a27b4db0a03817921eb7b7e5a90590b7bb01b /hugolib/config.go | |
parent | 2ff108fcb7059dd9b73526b1bfce42b43579fc25 (diff) |
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.
Diffstat (limited to 'hugolib/config.go')
-rw-r--r-- | hugolib/config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hugolib/config.go b/hugolib/config.go index e2d304937..f3e1d3ec9 100644 --- a/hugolib/config.go +++ b/hugolib/config.go @@ -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() |