hugo-cms/templates/pages/edit.html

14 lines
446 B
HTML
Raw Permalink Normal View History

2025-02-16 00:43:22 +00:00
{{- $postTarget := printf "/sites/%v/pages" .site.ID -}}
{{- if (ne .page.ID 0) -}}
{{- $postTarget = printf "/sites/%v/pages/%v" .site.ID .page.ID -}}
{{- end -}}
<form method="post" action="{{$postTarget}}" class="post-form">
<input name="title" placeholder="Title" value="{{.page.Title}}">
<textarea name="body">{{.page.Body}}</textarea>
<div class="bottom-bar">
<input type="submit" value="Post">
</div>
</form>