diff --git a/document.go b/document.go index 5f7e458..1a588d3 100644 --- a/document.go +++ b/document.go @@ -7,13 +7,13 @@ import "html/template" // Document represents a STEP file. type Document struct { - Author string - Title string - Extends string + Author string + Title string + Extends string + FrontMatter FrontMatter // WORM: environment *Environment - frontMatter FrontMatter name string parseTime time.Time template *template.Template @@ -41,7 +41,7 @@ func (this *Document) Execute (output io.Writer, data ExecutionData) error { Author: this.Author, Title: this.Title, Extends: this.Extends, - FrontMatter: this.frontMatter, + FrontMatter: this.FrontMatter, Body: template.HTML(outputBuilder.String()), }, }) diff --git a/environment.go b/environment.go index 720be7f..fcdf128 100644 --- a/environment.go +++ b/environment.go @@ -91,10 +91,10 @@ func (this *Environment) parse (name string, modTime time.Time, input io.Reader) // assemble the document struct document := &Document { + FrontMatter: frontMatter, environment: this, name: name, parseTime: time.Now(), - frontMatter: frontMatter, template: template.New(name), } if author, ok := frontMatter["author"]; ok {