fix: parse templates individually to prevent content block overwrite
Some checks failed
CI / lint (push) Failing after 19s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / docker (push) Has been skipped

Root cause: ParseFS with wildcard html/*.html caused all {{define "content"}}

blocks to overwrite each other — last alphabetically (register.html) won for

all pages. Now each page is parsed separately with base.html as its own template.

Also fix footer link: GitHub → Gitea project page.
This commit is contained in:
2026-06-04 16:57:34 +03:00
parent 2f1f1ef7d6
commit 21d48200f5
2 changed files with 25 additions and 17 deletions

View File

@@ -348,7 +348,7 @@
</header>
<main><div class="container">{{template "content" .}}</div></main>
<footer>
<p>MrixsCraft Server &copy; 2026 · <a href="https://github.com/Mrixs/MrixsCraft-server">GitHub</a></p>
<p>MrixsCraft Server &copy; 2026 · <a href="https://gitea.mrixs.me/Mrixs/MrixsCraft">Gitea</a></p>
</footer>
<script>
// Update nav based on auth state