mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02: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:
committed by
Bjørn Erik Pedersen
parent
dd732e84f4
commit
c9fc0e786f
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user