hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit ad69374f8b132f0afddb9203300c600b9f21386b
parent dcea0fa5ce125d1a9009b5e5b8a38f00c57bcee9
Author: spf13 <steve.francia@gmail.com>
Date:   Tue,  4 Nov 2014 00:28:20 -0500

Source files can provide content as String or Bytes or Reader

Diffstat:
Msource/file.go | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/source/file.go b/source/file.go
@@ -39,6 +39,14 @@ func (f *File) UniqueId() string {
 	return f.uniqueId
 }
 
+func (f *File) String() string {
+	return helpers.ReaderToString(f.Contents)
+}
+
+func (f *File) Bytes() []byte {
+	return helpers.ReaderToBytes(f.Contents)
+}
+
 // Filename without extension
 func (f *File) BaseFileName() string {
 	return helpers.Filename(f.LogicalName())