minor corrections
Jes Olson j3s@c3f.net
Sun, 24 Sep 2023 13:43:44 -0500
2 files changed,
4 insertions(+),
5 deletions(-)
M
main.go
→
main.go
@@ -23,7 +23,7 @@ "git.j3s.sh/j3s.sh/openlibrary"
"github.com/SlyMarbo/rss" ) -//go:embed thought +//go:embed thought/* var thoughtFiles embed.FS //go:embed templates@@ -98,7 +98,7 @@ // http.HandleFunc("/review/", postHandler)
http.HandleFunc("/thought/", thoughtHandler) http.HandleFunc("/", serveRoot) - log.Println("listening on :4666 tbh") + log.Println("listening on localhost:4666") err = http.ListenAndServe(":4666", nil) if err != nil { log.Fatal(err)@@ -154,7 +154,7 @@ if r.URL.Path == "/" {
r.URL.Path = "index.html" } - renderPage(w, r, r.URL.Path, nil) + renderPage(w, r, r.URL.Path, templateData) } func thoughtHandler(w http.ResponseWriter, r *http.Request) {@@ -169,7 +169,6 @@ }
return } - log.Println(string(content)) renderPage(w, r, "thought.html", string(content)) }
M
templates/now.html
→
templates/now.html
@@ -6,7 +6,7 @@ <h3>now</h3>
<p>this page descibes what i'm up to _now_</p> <h4>books</h4> <p>books i'm reading currently: -{{- range $entry := .CurrentBooks.ReadingLogEntries }} +{{- range $entry := .Data.CurrentBooks.ReadingLogEntries }} <li> <a href="https://openlibrary.org{{ $entry.Work.Key }}">{{ $entry.Work.Title | toLower }}</a> </li>