From ceff4d1205f80e86befa50b98eca53eecfb40915 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 6 Dec 2024 01:49:41 -0500 Subject: [PATCH] Remove ContentType from Document --- document.go | 15 ++++++--------- environment.go | 3 --- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/document.go b/document.go index 6da461c..5f7e458 100644 --- a/document.go +++ b/document.go @@ -7,10 +7,9 @@ import "html/template" // Document represents a STEP file. type Document struct { - Author string - Title string - Extends string - ContentType string + Author string + Title string + Extends string // WORM: environment *Environment @@ -42,7 +41,6 @@ func (this *Document) Execute (output io.Writer, data ExecutionData) error { Author: this.Author, Title: this.Title, Extends: this.Extends, - ContentType: this.ContentType, FrontMatter: this.frontMatter, Body: template.HTML(outputBuilder.String()), }, @@ -57,10 +55,9 @@ type ExecutionData struct { // ExecutionResult is the result of executing a document. type ExecutionResult struct { - Author string - Title string - Extends string - ContentType string + Author string + Title string + Extends string FrontMatter FrontMatter Body template.HTML diff --git a/environment.go b/environment.go index 8eeaf6b..720be7f 100644 --- a/environment.go +++ b/environment.go @@ -106,9 +106,6 @@ func (this *Environment) parse (name string, modTime time.Time, input io.Reader) if extends, ok := frontMatter["extends"]; ok { document.Extends = extends } - if contentType, ok := frontMatter["content-type"]; ok { - document.ContentType = contentType - } // parse template from the body document.template.Funcs(this.funcMap)