diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-07-15 01:10:41 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-07-15 01:10:41 -0400 |
| commit | 8b1d8bf26452f3ce8b38228a39755a6b8e18775a (patch) | |
| tree | f30f5cc86ce6758589d3d42607e829d0f537e70b /page | |
| parent | 904e37a88a6a2eab3919f7f2c40bbb2c07544a7c (diff) | |
| download | go-website-8b1d8bf26452f3ce8b38228a39755a6b8e18775a.tar.gz go-website-8b1d8bf26452f3ce8b38228a39755a6b8e18775a.tar.xz | |
Start on the example website. Remove some chunks of code. Fix up author handling in the feeds.
Diffstat (limited to 'page')
| -rw-r--r-- | page/page.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/page/page.go b/page/page.go index 8b84099..5604f1c 100644 --- a/page/page.go +++ b/page/page.go @@ -44,7 +44,6 @@ import ( type Page struct { path string Title string - Head string Description string AuthorName string AuthorEmail string @@ -112,34 +111,9 @@ func (p *Page) Render(wr io.Writer) error { return err } - // Automatically pull from the yml file if applicable - if p.Head != "" { - t, err = t.Parse(` - {{define "head"}} - {{.RenderHead}} - {{end}} - `) - if err != nil { - return err - } - } - return t.Execute(wr, p) } -func (p *Page) RenderHead() (string, error) { - buf := &bytes.Buffer{} - t, err := template.New("Head").Parse(p.Head) - if err != nil { - return "", err - } - err = t.Execute(buf, p) - if err != nil { - return "", err - } - return string(buf.Bytes()), nil -} - // Reads in the special markdown file format for the website off of the disk func (p *Page) Read() error { yamlBuf := bytes.NewBuffer(nil) |
