How davidvkimball/astro-modular works
Project type and purpose
• This is a Jamstack-style static site (blog theme) built with Astro, using Obsidian as a headless CMS via Vault CMS.
• Purpose: provide a highly customizable, performance-focused Astro theme for Obsidian users, with built-in SSG and some serverless JSON APIs for search, feeds, etc.
File structure
• Top-level:
• package.json / pnpm-lock.json / tsconfig.json / astro.config.mjs / tailwind.config.mjs / vite.config.mjs – ecosystem & build configs
• netlify.toml / wrangler.toml – deployment configs for Netlify & Cloudflare Workers
• scripts/ – custom Node scripts for setup, alias processing, graph data generation, image sync, deployment config
• public/ – static assets (images, docs, generated graph-data.json)
• src/ – all Astro source code:
– components/ (UI atoms & molecules)
– layouts/ (page templates)
– pages/ (Astro routes + API endpoints under pages/api/*.ts)
– content.config.ts + content/ (Obsidian vault markdown & attachments)
– config.ts (site settings & feature toggles)
– utils/ & scripts/ (helper functions & client bundles)
README for additional insights
• Built on Obsidian Astro Suite; uses Vault CMS plugin to map obsidian vault (.md files & attachments) into collections
• Generates sitemap, RSS, Open Graph images
• Supports multiple deployment targets (Netlify, Vercel, Cloudflare) via dynamic build script
Main components & interactions
a. Content Store
• “Obsidian Vault” folder (src/content) with markdown posts, docs, pages, projects, attachments, plugins, themes
b. Build Pipeline (Jamstack SSG)
• Node.js + PNPM → runs custom scripts (sync-images, generate-graph-data, process-aliases, generate-deployment-config)
• Astro / Vite / TailwindCSS compile components, layouts, style, generate static HTML/CSS/JS
• content.config.ts & Vault CMS plugin ingest markdown & frontmatter
• pages/api/*.ts compile into serverless JSON endpoints (search index, docs.json, pages.json, etc.)
c. Deployment Targets
• Static assets → CDN (hosted via Netlify / Vercel / Cloudflare Pages)
• Serverless functions → Netlify Functions / Vercel Serverless / Cloudflare Workers (wrangler.toml)
d. Client-side features
• React-style Astro client components (CommandPalette, SearchResults, GraphModal) fetch JSON APIs
• Graph view loads public/graph/graph-data.json
• GiscusComments widget calls external GitHub API
Architectural patterns & design principles
• Jamstack / Static Site Generation + serverless micro-APIs
• Component-driven UI (Astro + Islands architecture)
• Feature toggles & modular settings via config.ts
• Precomputed data artifacts (graph-data.json, JSON feeds) for performance