diff options
author | spf13 <steve.francia@gmail.com> | 2014-11-01 18:57:29 +0300 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2014-11-01 18:57:29 +0300 |
commit | 141f3e19e0a9ba873b0cece6071b1187daa81d8d (patch) | |
tree | cce0490471ad12ba2c9297f5eedea5411b8fef97 /target | |
parent | dfb848256994289f5571fae8343578cf455c6431 (diff) |
Migrating Hugo to Afero for filesystem calls.
Diffstat (limited to 'target')
-rw-r--r-- | target/file.go | 3 | ||||
-rw-r--r-- | target/htmlredirect.go | 3 |
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) } |