Add in-house comments (Lib\Comments)

A reusable comment thread any sidecar can attach to any page, tied to
real logged-in accounts (never anonymous), auto-approved on submission
with hide/delete moderation at /admin/comments — only a verified account
can post, so there's no anonymous-spam vector to pre-vet against.

Framework-level (novaconium/lib, novaconium/migrations, novaconium/pages),
not App/migrations, matching Admin auth and Media manager's shape. A page
needs its own sidecar to use it — this repo has no client-side JS, so
comments ride the same server-rendered POST pattern as every other
dynamic feature, which is also what excludes a page from the static
cache. App/pages/blog/comments-demo/ demonstrates the pattern without
touching existing posts that are referenced elsewhere as the
sidecar-less example.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
code
2026-07-15 19:38:04 +00:00
parent e699027b4b
commit 64defe7f74
15 changed files with 478 additions and 29 deletions
+7
View File
@@ -17,6 +17,13 @@
</aside>
<article>
{% block blog_content %}{% endblock %}
{# Only pages whose sidecar opts in by returning a 'comments'
key get a thread — see /admin/docs/comments and
App/pages/blog/hello-world/index.php. A sidecar-less post
never has this key, so it's silently skipped. #}
{% if comments is defined %}
{% include '_partials/comments/thread.twig' %}
{% endif %}
</article>
</div>
{% endblock %}