mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Remove RenderedContent from page.
The output is written directly to disk after being written. Not entirely sure why it was split into two steps.
This commit is contained in:
parent
2ebfb33fe0
commit
803a0fce1e
2 changed files with 3 additions and 17 deletions
|
@ -40,7 +40,6 @@ type Page struct {
|
|||
Summary template.HTML
|
||||
RawMarkdown string // TODO should be []byte
|
||||
Params map[string]interface{}
|
||||
RenderedContent *bytes.Buffer
|
||||
contentType string
|
||||
Draft bool
|
||||
Aliases []string
|
||||
|
|
|
@ -110,7 +110,6 @@ func (s *Site) Build() (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
s.Write()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -170,11 +169,6 @@ func (s *Site) Render() (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (s *Site) Write() {
|
||||
s.WritePages()
|
||||
s.timerStep("write pages")
|
||||
}
|
||||
|
||||
func (s *Site) checkDescriptions() {
|
||||
for _, p := range s.Pages {
|
||||
if len(p.Description) < 60 {
|
||||
|
@ -419,19 +413,12 @@ func (s *Site) RenderPages() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p.RenderedContent = content
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Site) WritePages() (err error) {
|
||||
for _, p := range s.Pages {
|
||||
err = s.WritePublic(p.OutFile, p.RenderedContent.Bytes())
|
||||
err = s.WritePublic(p.OutFile, content.Bytes())
|
||||
if err != nil {
|
||||
return
|
||||
return err
|
||||
}
|
||||
}
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Site) RenderIndexes() error {
|
||||
|
|
Loading…
Reference in a new issue