Files
garden-astro/README.md
T
wesandClaude Opus 4.8 04c9aa2fb2 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>
2026-07-15 14:18:59 -04:00

46 lines
1.8 KiB
Markdown

# garden-astro
Astro rebuild of the digital garden at `garden.c0smere.net`, replacing
Quartz v4. Content stays in the Obsidian vault (`Digital_Garden/` folder);
this repo is only the rendering pipeline.
## URL compatibility
Built to be a drop-in replacement — every URL on the live Quartz site
resolves identically here (verified against the live sitemap, 102/102):
- case preserved, spaces become `-`, hyphens/em-dashes kept
- leaf pages: `/Folder/Note-Name` (`build.format: 'file'` + nginx
`try_files $uri $uri.html`)
- folder indexes: `/Folder/` (from `Folder/index.md`, or a synthetic
listing page when no index exists)
## Obsidian compatibility (`src/lib/remark-obsidian.mjs`)
- `[[wikilinks]]` with aliases/anchors, resolved vault-path-first then by
basename; unresolved links degrade to plain text
- `![[image embeds]]` and relative `![md](images)` both rewrite to flat
`/assets/<name>` URLs; `scripts/copy-assets.mjs` resolves the files
(Digital_Garden first, then vault-wide) and copies them in at build time
- `> [!type]` callouts, KaTeX math, mermaid (lazy-loaded client-side only
on pages that use it), shiki dual light/dark themes
- `draft:` frontmatter excluded, including Quartz-style quoted `"true"`
## Build
```sh
GARDEN_CONTENT=/path/to/vault/Digital_Garden npm run build
```
Defaults to the kotov vault copy. On cyrion use `deploy/build.sh`
(containerized node:24, vault mounted read-only), then
`docker compose -f deploy/docker-compose.yml up -d` serves `dist/` on
port 18100 (`garden-next.c0smere.net` while staging).
## Homepage extras
`src/pages/index.astro` renders the vault's `index.md` and appends the
bandwidth odometer, fed by `https://api.c0smere.net/bandwidth/odometer`.
The widget animates at the lifetime average rate from a fetched baseline —
it never reflects live throughput, and hides itself if the API is down.