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:
Phil Pennock
2014-01-03 18:36:53 -05:00
committed by spf13
parent 2ff108fcb7
commit 438c219892
6 changed files with 88 additions and 39 deletions

View File

@@ -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()