Add typed text pages; serve CSS as compiled-on-demand /css/main.css

Sidecar-less page bundles whose directory ends in a MediaType extension
(.txt/.css/.xml/.json/.js) now render raw (no HTML layout, autoescape off),
are served with that extension's Content-Type, and cache as a flat file
(public/cache/<path>) so Apache serves them directly via a new .htaccess
rule. They're excluded from the content index.

CSS becomes one of these: novaconium/pages/css/main.css/ holds index.twig
({{ sass('main.sass') }}), main.sass, and _colors.sass. App\SassExtension's
sass() Twig function resolves the entry file through the overlay and shells
out to Dart Sass on a cache miss; Lib\SassCompiler wraps the CLI. This
drops the committed App/css/main.css build artifact and the public/css
bind mount. Override styling by copying the whole bundle to App/pages/.

Also ship robots.txt and humans.txt as framework bundles, and drop the
php -S dev router (public/router.php) - Docker/Apache only now.

New: novaconium/src/MediaType.php, SassExtension.php, lib/SassCompiler.php.
Moved: novaconium/sass/ -> novaconium/pages/css/main.css/ (+ App/sass merged).
Docs: AGENTS.md, new /admin/docs/text-pages, and styling/caching/docker/
design-notes/getting-started/project-layout/config docs updated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Q9cAXC9xcXYnmP7qjsnw7
This commit is contained in:
code
2026-09-10 20:58:37 +00:00
co-authored by Claude Sonnet 5
parent 551efc0c36
commit f2724972af
33 changed files with 442 additions and 720 deletions
+7 -5
View File
@@ -17,11 +17,13 @@ RUN apt-get update \
&& docker-php-ext-install pdo_sqlite pdo_mysql \
&& a2enmod rewrite
# Dart Sass standalone, so the container can compile
# novaconium/sass/main.sass -> App/css/main.css itself (see AGENTS.md
# "Conventions worth knowing" and /admin/docs/styling). Debian trixie has
# no usable dart-sass package, so pull the pinned upstream release tarball.
# Bump DART_SASS_VERSION deliberately, like the PHP base tag above.
# Dart Sass standalone. It's a *runtime* dependency: the /main.css route
# (a "typed text page" — see /admin/docs/text-pages and /admin/docs/styling)
# has App\SassExtension shell out to `sass` on a cache miss to compile
# App/pages/main.css/main.sass, then the result is cached like any other
# page. Debian trixie has no usable dart-sass package, so pull the pinned
# upstream release tarball. Bump DART_SASS_VERSION deliberately, like the
# PHP base tag above.
ENV DART_SASS_VERSION=1.83.4
RUN set -eux; \
arch="$(dpkg --print-architecture)"; \