~srivathsan/blaze

a4737110bc1e48cfade02d489375cad248240d8c — Srivathsan Murali 3 years ago f3d9722
Dont parse template if empty
1 files changed, 9 insertions(+), 3 deletions(-)

M builder/page.go
M builder/page.go => builder/page.go +9 -3
@@ 101,9 101,15 @@ func (p *Page) WritePage() error {
		return err
	}

	readyData, err := ParseTemplate(p.Site, p.Template, p)
	if err != nil {
		return err
	var readyData []byte
	var err error
	if p.Template == "" {
		readyData = []byte(p.Content)
	} else {
		readyData, err = ParseTemplate(p.Site, p.Template, p)
		if err != nil {
			return err
		}
	}

	if err := ioutil.WriteFile(p.outputPath, readyData, 0644); err != nil {