hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit c9fc0e786f1f957b16479fba3e8c039d7f5d03f3
parent dd732e84f43570d87dba49a1e42061f8bd4f6afa
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date:   Thu,  2 Jul 2015 09:32:57 -0400

Add Page.RawContent() to access raw Markdown as a string.

In particular, RawContent() excludes the metadata header.

This is necessary in the use case of embedding remarkjs.com slides, as it needs
the unprocessed Markdown content to generate the slides.

Diffstat:
Mhugolib/page.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/hugolib/page.go b/hugolib/page.go
@@ -726,6 +726,10 @@ func (p *Page) parse(reader io.Reader) error {
 	return nil
 }
 
+func (p *Page) RawContent() string {
+	return string(p.rawContent)
+}
+
 func (p *Page) SetSourceContent(content []byte) {
 	p.Source.Content = content
 }