Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorspf13 <steve.francia@gmail.com>2014-11-01 18:57:29 +0300
committerspf13 <steve.francia@gmail.com>2014-11-01 18:57:29 +0300
commit141f3e19e0a9ba873b0cece6071b1187daa81d8d (patch)
treecce0490471ad12ba2c9297f5eedea5411b8fef97 /target
parentdfb848256994289f5571fae8343578cf455c6431 (diff)
Migrating Hugo to Afero for filesystem calls.
Diffstat (limited to 'target')
-rw-r--r--target/file.go3
-rw-r--r--target/htmlredirect.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/target/file.go b/target/file.go
index f70558098..fa4e79681 100644
--- a/target/file.go
+++ b/target/file.go
@@ -6,6 +6,7 @@ import (
"path"
"github.com/spf13/hugo/helpers"
+ "github.com/spf13/hugo/hugofs"
)
type Publisher interface {
@@ -34,7 +35,7 @@ func (fs *Filesystem) Publish(path string, r io.Reader) (err error) {
return
}
- return helpers.WriteToDisk(translated, r)
+ return helpers.WriteToDisk(translated, r, hugofs.DestinationFS)
}
func (fs *Filesystem) Translate(src string) (dest string, err error) {
diff --git a/target/htmlredirect.go b/target/htmlredirect.go
index 73a769f87..6ccfb73d3 100644
--- a/target/htmlredirect.go
+++ b/target/htmlredirect.go
@@ -7,6 +7,7 @@ import (
"strings"
"github.com/spf13/hugo/helpers"
+ "github.com/spf13/hugo/hugofs"
)
const ALIAS = "<!DOCTYPE html><html><head><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0;url={{ .Permalink }}\" /></head></html>"
@@ -68,5 +69,5 @@ func (h *HTMLRedirectAlias) Publish(path string, permalink template.HTML) (err e
return
}
- return helpers.WriteToDisk(path, buffer)
+ return helpers.WriteToDisk(path, buffer, hugofs.DestinationFS)
}