mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
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.
This commit is contained in:
parent
dd732e84f4
commit
c9fc0e786f
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue