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:
@@ -0,0 +1,20 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import remarkMath from 'remark-math';
|
||||
import rehypeKatex from 'rehype-katex';
|
||||
import { remarkObsidian } from './src/lib/remark-obsidian.mjs';
|
||||
import { buildSlugMap, CONTENT_DIR } from './src/lib/quartz-compat.mjs';
|
||||
|
||||
const slugMap = buildSlugMap(CONTENT_DIR);
|
||||
|
||||
export default defineConfig({
|
||||
site: 'https://garden.c0smere.net',
|
||||
// 'file' => /A/B.html served as /A/B — matches Quartz's URL shape
|
||||
build: { format: 'file' },
|
||||
markdown: {
|
||||
remarkPlugins: [[remarkObsidian, { slugMap }], remarkMath],
|
||||
rehypePlugins: [rehypeKatex],
|
||||
shikiConfig: {
|
||||
themes: { light: 'github-light', dark: 'github-dark' },
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user