{% extends layout %} {% import '_layout/icons.twig' as icons %} {% block title %}Comments Demo{% endblock %} {% block description %}A worked example of Lib\Comments — this post has its own sidecar, unlike every other post here, specifically so it can carry a live comment thread.{% endblock %} {% block robots %}index, follow{% endblock %} {% block tags %}comments, meta{% endblock %} {% block canonical %}{{ request_path|default('/') }}{% endblock %} {% block og_type %}article{% endblock %} {% block og_title %}{{ block('title') }}{% endblock %} {% block og_description %}{{ block('description') }}{% endblock %} {% block og_url %}{{ block('canonical') }}{% endblock %} {% block twitter_card %}summary{% endblock %} {% block twitter_title %}{{ block('title') }}{% endblock %} {% block twitter_description %}{{ block('description') }}{% endblock %} {% block blog_content %}
Unlike every other post under App/pages/blog/, this one has its own index.php sidecar — App/pages/blog/comments-demo/index.php — which reads and writes a comments table via Lib\Comments and returns a comments key in its context. App/pages/blog/_layout/layout.twig only includes the comment-thread partial (novaconium/pages/_partials/comments/thread.twig) when that key is present, so this is the only post here with a thread below.
Having a sidecar means this page is never served from the static HTML cache the way its sidecar-less siblings are (see {{ icons.book() }}Static caching) — an explicit, per-page tradeoff you accept the moment a page needs comments. See {{ icons.users() }}Comments for the full write-up of Lib\Comments, including why comments are tied to real logged-in accounts rather than anonymous name/email fields, and why they're auto-approved with after-the-fact moderation at /admin/comments rather than a pending queue.