Finish feed support
alex wennerberg alex@alexwennerberg.com
Tue, 15 Dec 2020 20:41:28 -0800
3 files changed,
4 insertions(+),
3 deletions(-)
M
gemfeed.go
→
gemfeed.go
@@ -17,7 +17,7 @@
type Gemfeed struct { Title string Creator string - FeedUrl *url.URL + Url *url.URL Entries []*FeedEntry }@@ -46,7 +46,7 @@ feed, err := ParseGemfeed(f, baseUrl, maxUserItems) // TODO make configurable
f.Close() if err == nil { feed.Creator = creator - feed.FeedUrl = &baseUrl + feed.Url = &baseUrl feedEntries = append(feedEntries, feed.Entries...) } }
M
templates/feed.html
→
templates/feed.html
@@ -9,7 +9,7 @@ <h2>Feed:</h2>
{{ range .FeedEntries}} <p> {{.DateString}} <a href="//{{.Feed.Creator}}.{{$domain}}">{{.Feed.Creator}}</a> -{{ if .Feed.Title }}<a href="{{.Url}}" class='person-link'>({{.Feed.Title}}){{end}} {{.Title}}</a> +{{ if .Feed.Title }}<em><a href="{{.Feed.Url}}" class='person-link'>{{.Feed.Title}}</a></em>{{end}} <a href="{{.Url}}">{{.Title}}</a> </p> {{end}} {{template "footer" .}}