aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform/chain.go
diff options
context:
space:
mode:
authorPhil Pennock <[email protected]>2014-01-03 18:36:53 -0500
committerspf13 <[email protected]>2014-01-13 10:06:12 -0500
commit438c2198923022a3e4d299b06a7df18268041dd8 (patch)
tree2e0a27b4db0a03817921eb7b7e5a90590b7bb01b /transform/chain.go
parent2ff108fcb7059dd9b73526b1bfce42b43579fc25 (diff)
downloadhugo-438c2198923022a3e4d299b06a7df18268041dd8.tar.gz
hugo-438c2198923022a3e4d299b06a7df18268041dd8.zip
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 'transform/chain.go')
-rw-r--r--transform/chain.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/transform/chain.go b/transform/chain.go
index fb3c2985c..c673c5d6a 100644
--- a/transform/chain.go
+++ b/transform/chain.go
@@ -15,6 +15,10 @@ func NewChain(trs ...link) chain {
return trs
}
+func NewEmptyTransforms() []link {
+ return make([]link, 0, 20)
+}
+
func (c *chain) Apply(w io.Writer, r io.Reader) (err error) {
buffer := new(bytes.Buffer)