flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit 976db1036ed6aa057228c685bcd74a15a38180b6
parent 9c0e563853c52e7790c21f7b740e01ef0c344f0d
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Tue, 15 Dec 2020 20:41:28 -0800

Finish feed support

Diffstat:
Mgemfeed.go | 4++--
Mtemplates/feed.html | 2+-
Mtemplates/nav.html | 1+
3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/gemfeed.go b/gemfeed.go @@ -17,7 +17,7 @@ import ( type Gemfeed struct { Title string Creator string - FeedUrl *url.URL + Url *url.URL Entries []*FeedEntry } @@ -46,7 +46,7 @@ func getAllGemfeedEntries() ([]*FeedEntry, error) { f.Close() if err == nil { feed.Creator = creator - feed.FeedUrl = &baseUrl + feed.Url = &baseUrl feedEntries = append(feedEntries, feed.Entries...) } } diff --git a/templates/feed.html b/templates/feed.html @@ -9,7 +9,7 @@ For more information on how to format your site to show up here, see <a href="ht {{ 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" .}} diff --git a/templates/nav.html b/templates/nav.html @@ -1,5 +1,6 @@ <nav> <a href="/">home</a> + <a href="/feed">feed</a> {{ if .AuthUser.LoggedIn }} <a href="/my_site">my_site</a> <a href="/me">me</a>