From 74c0d590192f5ed60ded535945c4173b119877a0 Mon Sep 17 00:00:00 2001 From: code Date: Tue, 14 Jul 2026 18:28:49 +0000 Subject: [PATCH] Add Blog RSS feed, footer feed/sitemap links, and expanded docs Blog RSS feed (novaconium/ISSUES.md): - App/pages/blog/feed/index.php - main feed, built from the same hand-written $posts array App/pages/blog/index.php renders from, so it works with content_index_enabled left at its default false. Added a published date field per post entry. - App/pages/blog/tag/[tag]/feed/index.php - per-tag feed, gated on content_index_enabled the same way blog/tag/[tag]/index.php is. - novaconium/lib/Rss.php - shared RSS 2.0 envelope builder both feeds use, generic (title/link/description/items in, XML string out). - New head_extra block in the root layout (empty by default) so App/pages/blog/_layout/layout.twig can add feed auto-discovery scoped to /blog/* only. Footer: - New content_index_enabled Twig global (Renderer/bootstrap.php), same pattern as admin_auth_enabled. - Right-aligned footer menu linking to /sitemap.xml (only shown when content_index_enabled, so it never links to a 404) and /blog/feed (always shown, no content-index dependency). Docs: - New /admin/docs/rss page: Lib\Rss API, the two shipped feeds, a worked example of adding a feed for another content collection, and how to advertise multiple feeds via head_extra. - New /admin/docs/sitemap page: changefreq/priority blocks, what's included/excluded, an honest callout on the relative--URL spec deviation (consistent with how canonical/og:url already work) with an override path for strict compliance, and submitting it to search engines. - /admin/docs (Overview) gains a Requirements section: minimum requirements, then optional requirements for the database/content-index features (pdo_sqlite, optional pdo_mysql, FTS5) - and a Documentation heading separating it from the doc links list. - /admin/docs/getting-started's Requirements line was stale (missing pdo_sqlite entirely, unlike README) - fixed and cross-linked to the Overview page's fuller list. - /admin/docs/content-index trimmed to point at the new RSS/sitemap pages instead of duplicating their detail. Also adds an "In-house comments" entry to novaconium/ISSUES.md's Backlog - a Lib\ class for sidecar-attached comments on any page, depending on the not-yet-built Admin login & user management for real user accounts. Closes the "Blog RSS feed" backlog item. --- App/pages/blog/_layout/layout.twig | 7 ++ App/pages/blog/feed/index.php | 48 ++++++++ App/pages/blog/index.php | 32 +++-- App/pages/blog/tag/[tag]/feed/index.php | 70 +++++++++++ README.md | 5 +- novaconium/ISSUES.md | 112 ++++++++++++------ novaconium/bootstrap.php | 2 +- novaconium/lib/Rss.php | 49 ++++++++ novaconium/pages/_layout/layout.twig | 14 +++ .../pages/admin/docs/_layout/layout.twig | 2 + .../pages/admin/docs/content-index/index.twig | 4 +- .../admin/docs/getting-started/index.twig | 2 +- novaconium/pages/admin/docs/index.twig | 19 ++- novaconium/pages/admin/docs/rss/index.twig | 104 ++++++++++++++++ novaconium/pages/admin/docs/seo/index.twig | 1 + .../pages/admin/docs/sitemap/index.twig | 56 +++++++++ novaconium/sass/main.sass | 11 ++ novaconium/src/Renderer.php | 7 ++ public/css/main.css | 13 ++ 19 files changed, 506 insertions(+), 52 deletions(-) create mode 100644 App/pages/blog/feed/index.php create mode 100644 App/pages/blog/tag/[tag]/feed/index.php create mode 100644 novaconium/lib/Rss.php create mode 100644 novaconium/pages/admin/docs/rss/index.twig create mode 100644 novaconium/pages/admin/docs/sitemap/index.twig diff --git a/App/pages/blog/_layout/layout.twig b/App/pages/blog/_layout/layout.twig index b004f7b..2fb2e22 100644 --- a/App/pages/blog/_layout/layout.twig +++ b/App/pages/blog/_layout/layout.twig @@ -2,6 +2,13 @@ {% import '_layout/icons.twig' as icons %} +{# Feed auto-discovery — only shows up on /blog/* pages, since only this + layout overrides the root layout's empty head_extra block. See + App/pages/blog/feed/index.php. #} +{% block head_extra %} + +{% endblock %} + {% block content %}