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-<loc>-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.
This commit is contained in:
@@ -20,6 +20,7 @@ A tiny, Hugo-flavored PHP micro-framework. Routes are directories on disk, pages
|
||||
- **SQLite/MySQL database, zero setup** — `Lib\Db`, a thin PDO wrapper (no ORM) supporting multiple named connections open at once — e.g. this site's own SQLite data plus a MySQL connection to a legacy database, usable in the same sidecar — each with its own plain-SQL migration convention, applied automatically on first use or via `php novaconium/bin/migrate.php`. SQLite data lives in a project-owned top-level `data/` directory, outside both `public/` and `novaconium/`. See `/admin/docs/database`.
|
||||
- **Sessions with flash data** — `Lib\Session`, a thin wrapper around native PHP sessions with CodeIgniter-style flash values (set now, readable on exactly the next request) for post/redirect/GET flows without a query-string flag. Lazy-start, same mechanism `Lib\Csrf` already uses. See `/admin/docs/session`.
|
||||
- **Content index: sitemap, search, tags** — `/sitemap.xml`, full-text `/search` (SQLite FTS5), and blog tag browsing all share one crawler that renders every page and harvests `keywords`/`tags`/`changefreq`/`priority` Twig blocks via Twig's own `renderBlock()` — no front-matter, no separate metadata files. Off by default (depends on SQLite); reindexes lazily on demand or via `php novaconium/bin/index-content.php`. See `/admin/docs/content-index`.
|
||||
- **Blog RSS feed** — `/blog/feed`, built from the same hand-written post list `App/pages/blog/index.php` itself renders from, so it works with no database at all. `Lib\Rss` (a small RSS 2.0 envelope builder) also backs a per-tag feed, `/blog/tag/<tag>/feed`, once the content index above is enabled. Auto-discovered via a `<link rel="alternate">` on `/blog/*` pages.
|
||||
- **No build step, no Composer** — clone it, point Apache (or `php -S`) at `public/`, and it runs. Twig is vendored as source; see `/admin/docs/upgrading-twig` for upgrading it.
|
||||
|
||||
## Getting started
|
||||
@@ -80,7 +81,7 @@ php novaconium/bin/create-static-page.php blog/my-new-post
|
||||
|
||||
## Documentation
|
||||
|
||||
The full framework documentation — routing, sidecars, libraries, database, session, content index, layouts, static caching, SEO, Matomo analytics, admin authentication, draft pages, styling, project layout, and third-party notices — lives at `/admin/docs` on any running instance (so it travels with the code, no internet connection needed). Highlights:
|
||||
The full framework documentation — routing, sidecars, libraries, database, session, content index, XML sitemap, RSS feeds, layouts, static caching, SEO, Matomo analytics, admin authentication, draft pages, styling, project layout, and third-party notices — lives at `/admin/docs` on any running instance (so it travels with the code, no internet connection needed). Highlights:
|
||||
|
||||
- [Getting started](http://127.0.0.1:8000/admin/docs/getting-started)
|
||||
- [Routing](http://127.0.0.1:8000/admin/docs/routing)
|
||||
@@ -89,6 +90,8 @@ The full framework documentation — routing, sidecars, libraries, database, ses
|
||||
- [Database](http://127.0.0.1:8000/admin/docs/database)
|
||||
- [Session](http://127.0.0.1:8000/admin/docs/session)
|
||||
- [Content index](http://127.0.0.1:8000/admin/docs/content-index)
|
||||
- [XML sitemap](http://127.0.0.1:8000/admin/docs/sitemap)
|
||||
- [RSS feeds](http://127.0.0.1:8000/admin/docs/rss)
|
||||
- [Layouts](http://127.0.0.1:8000/admin/docs/layouts)
|
||||
- [Static caching](http://127.0.0.1:8000/admin/docs/caching)
|
||||
- [SEO](http://127.0.0.1:8000/admin/docs/seo)
|
||||
|
||||
Reference in New Issue
Block a user