feat: notify document updates over websocket

This commit is contained in:
2026-04-29 09:14:49 -04:00
parent 9b8f2968e8
commit 6e244d55db
12 changed files with 358 additions and 19 deletions

View File

@@ -27,6 +27,11 @@
{{ template "error_content" .Data }}
{{ end }}
</main>
<div class="version-notice" data-version-notice hidden>
<p>A newer version is available.</p>
<button type="button" data-version-reload>Reload</button>
</div>
<script src="/static/realtime.js" defer></script>
</body>
</html>
{{ end }}

View File

@@ -1,7 +1,7 @@
{{ define "document.gohtml" }}{{ template "base" . }}{{ end }}
{{ define "document_content" }}
<article class="document-shell">
<article class="document-shell" data-document-path="{{ .Path }}" data-document-hash="{{ .Hash }}">
<div class="document-meta">
<p class="eyebrow">{{ .Path }}</p>
<h1>{{ .Title }}</h1>