flounder

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

commit 72096c39454189134dd579352bb123f0ffaa1cec
parent 1dff307d9086d5015da568e89a51ffcc07d44a42
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Fri, 27 Nov 2020 09:19:01 -0800

Change edit file UI

Diffstat:
Mhttp.go | 2+-
Mtemplates/edit_file.html | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/http.go b/http.go @@ -155,7 +155,7 @@ func editFileHandler(w http.ResponseWriter, r *http.Request) { os.MkdirAll(path.Dir(newPath), os.ModePerm) os.Rename(filePath, newPath) } - http.Redirect(w, r, "/my_site", 303) + http.Redirect(w, r, path.Join("/edit", fileName), 303) } } diff --git a/templates/edit_file.html b/templates/edit_file.html @@ -6,5 +6,6 @@ <textarea rows="25" name="file_text" id="editor">{{.FileText}}</textarea> <br> <input type="submit" value="Save file" class="button"> + <a href="/my_site">Back</a> </form> {{template "footer" .}}