summaryrefslogtreecommitdiffstats
path: root/target/page.go
diff options
context:
space:
mode:
Diffstat (limited to 'target/page.go')
-rw-r--r--target/page.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/page.go b/target/page.go
index ab38ded58..bfa431aa3 100644
--- a/target/page.go
+++ b/target/page.go
@@ -35,6 +35,8 @@ type PagePub struct {
// LangDir will contain the subdir for the language, i.e. "en", "de" etc.
// It will be empty if the site is rendered in root.
LangDir string
+
+ Fs *hugofs.Fs
}
func (pp *PagePub) Publish(path string, r io.Reader) (err error) {
@@ -44,7 +46,7 @@ func (pp *PagePub) Publish(path string, r io.Reader) (err error) {
return
}
- return helpers.WriteToDisk(translated, r, hugofs.Destination())
+ return helpers.WriteToDisk(translated, r, pp.Fs.Destination)
}
func (pp *PagePub) Translate(src string) (dest string, err error) {