Astro garden skeleton: Quartz-compatible URLs, Obsidian markdown, odometer homepage
- glob content loader over the vault's Digital_Garden with verbatim-path ids - remark plugin: wikilinks, image embeds (wiki + relative md), callouts - URL parity with live Quartz sitemap verified 102/102 (built set is a strict superset: +30 synthetic folder listings) - KaTeX, lazy mermaid, shiki dual themes, quoted-string draft handling - copy-assets resolves embeds vault-wide (fixes live-site 404s for Blog Scratch/assets images) into flat /assets/ - homepage odometer widget: fetches api.c0smere.net baseline, ticks at lifetime average rate, fail-closed hidden on error - deploy/: nginx try_files config + compose (port 18100) + containerized build script for cyrion Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Containerized build for cyrion: mounts the Obsidian vault read-only and
|
||||
# writes dist/ into the repo checkout. Run from the repo root.
|
||||
set -eu
|
||||
|
||||
VAULT="${VAULT:-/home/nox/docker/obsidian/vaults/weeslahw_coppermind}"
|
||||
|
||||
docker run --rm \
|
||||
-v "$(pwd):/app" \
|
||||
-v "$VAULT:/content:ro" \
|
||||
-e GARDEN_CONTENT=/content/Digital_Garden \
|
||||
-e ASTRO_TELEMETRY_DISABLED=1 \
|
||||
-w /app \
|
||||
node:24-slim \
|
||||
sh -c "npm ci && npm run build"
|
||||
@@ -0,0 +1,11 @@
|
||||
# Serves the prebuilt dist/ — run deploy/build.sh first.
|
||||
services:
|
||||
garden-next:
|
||||
image: nginx:alpine
|
||||
container_name: garden-next
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "18100:80"
|
||||
volumes:
|
||||
- ../dist:/usr/share/nginx/html:ro
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
charset utf-8;
|
||||
|
||||
# Quartz-compatible URLs: /A/B -> A/B.html, /Folder/ -> Folder/index.html
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/index.html =404;
|
||||
}
|
||||
|
||||
location /assets/ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /_astro/ {
|
||||
# content-hashed filenames — safe to cache hard
|
||||
expires 365d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user