small pixel drawing of a pufferfish j3s.sh

.html -> .txt
Jesse Olson j3s@c3f.net
Fri, 08 Apr 2022 07:35:41 +0000
commit

c08fb465a2d8b4f7ebdfdaf1dc1a2666b6df4a5a

parent

54a462e930fe76c43d0489e7408265b30a74b9a0

M READMEREADME

@@ -4,8 +4,12 @@ [x] add project section

[x] make image not bounce text while loading (reserve height?) - locked width & height of the header image :shrug: [x] add alternate puffy to the thoughts and reviews pages :3 +[x] change all things to .txt [ ] make blog have rss feed for select thoughts/reviews + - if "draft" is the first line, dont display it + +[ ] fix line breaks [ ] draw & add pufferfish favicon [ ] merge jrss into website tools codebase [ ] make blog handle TLS
M main.gomain.go

@@ -94,8 +94,10 @@

func babyHandler(w http.ResponseWriter, r *http.Request) { lp := filepath.Join("templates", "simple-layout.html") fp := filepath.Join(strings.TrimPrefix(filepath.Clean(r.URL.Path), "/")) + // load the named .txt file for processing + txt := strings.ReplaceAll(fp, ".html", ".txt") - info, err := os.Stat(fp) + info, err := os.Stat(txt) if err != nil { if os.IsNotExist(err) { http.NotFound(w, r)

@@ -108,7 +110,7 @@ http.NotFound(w, r)

return } - content, err := os.ReadFile(fp) + content, err := os.ReadFile(txt) if err != nil { log.Println(err.Error()) http.Error(w, http.StatusText(500), 500)