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 /cmd/server/feed.go | |
| 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 'cmd/server/feed.go')
| -rw-r--r-- | cmd/server/feed.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/server/feed.go b/cmd/server/feed.go index 2d4a75b..073097b 100644 --- a/cmd/server/feed.go +++ b/cmd/server/feed.go @@ -189,6 +189,15 @@ func (a *App) FeedHandler(w http.ResponseWriter, r *http.Request) { Links: []Link{Link{Href: strings.Join([]string{a.SiteURL, p.Path()}, "/")}}, } + if p.AuthorName != "" { + entry.Author = &Author{ + Name: p.AuthorName, + } + if p.AuthorEmail != "" { + entry.Author.Email = p.AuthorEmail + } + } + if addContent { entry.Content = &Content{Type: "html", Data: content.String()} } |
