.html -> .txt
Jesse Olson j3s@c3f.net
Fri, 08 Apr 2022 07:35:41 +0000
41 files changed,
8 insertions(+),
2 deletions(-)
jump to
M
README
→
README
@@ -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.go
→
main.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)