aboutsummaryrefslogtreecommitdiff
path: root/templates/wiki-edit.html
diff options
context:
space:
mode:
authorLena <lena@omega>2026-08-01 00:00:00 +0000
committerLena <lena@omega>2026-08-01 00:00:00 +0000
commitbb6bc2387d58c737dbf92e73f8544bf39319dbd8 (patch)
tree6d5eaf5dac213074cd832da50f64260fce728fed /templates/wiki-edit.html
downloadgit-forge-master.tar.gz
Enter git-forgeHEADmaster
A small self-hosted git forge: HTTP push and pull, cgit browsing, local and OIDC accounts, TOTP, scoped push tokens, per-repo permissions, issues, a wiki, and outbound mail. It does not reimplement git. git-http-backend and cgit run as CGI behind its own listener, which authorises every request before exec'ing either. One binary, one data directory, one listener: no database, no JavaScript, and state is JSON in a git repo with a working tree.
Diffstat (limited to 'templates/wiki-edit.html')
-rw-r--r--templates/wiki-edit.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/wiki-edit.html b/templates/wiki-edit.html
new file mode 100644
index 0000000..ed896d2
--- /dev/null
+++ b/templates/wiki-edit.html
@@ -0,0 +1,27 @@
+{{define "title"}}Edit {{.Data.Page}} - {{.Data.Path}} - {{.Site}}{{end}}
+{{define "main"}}
+<h2>Edit wiki{{with .Data.Page}} <span class="dim">{{.}}</span>{{end}}</h2>
+
+{{with .Data.Preview}}
+<h3>Preview</h3>
+<article>{{.}}</article>
+<hr>
+{{end}}
+
+<form method="post" action="/{{.Data.Path}}/wiki/{{.Data.Page}}">
+<input type="hidden" name="csrf" value="{{.CSRF}}">
+<input type="hidden" name="base" value="{{.Data.Base}}">
+<p>
+<label for="body">{{.Data.File}}, markdown</label>
+<textarea id="body" name="body" rows="24">{{.Data.Body}}</textarea>
+</p>
+<p>
+<button type="submit" name="action" value="save">Save</button>
+<button type="submit" name="action" value="preview">Preview</button>
+</p>
+</form>
+<p class="dim">
+Links between pages are plain relative markdown links, and a subdirectory's
+index.md is served at the subdirectory itself.
+</p>
+{{end}}