Source code for respawn.io (also served on natik.dev). Built with Astro, Tailwind, and Content Collections.
Note: This site was previously built with Next.js and Contentlayer. That approach is now deprecated. If you're interested in the old setup, see Contentlayer with multiple data types.
- Content Collections with full TypeScript support for posts, daily notes, pages, and tags.
- Mermaid diagrams rendered at build time with rehype-mermaid.
- OG images generated at build time with Puppeteer (no edge runtime required).
- RSS/Atom/JSON feeds for all published posts.
- MDX support with optimized images and wikilinks.
- Draft posts via
draft: truein front matter. - Minimal JavaScript — static HTML with optional hydration for interactive components.
The site is deployed as a standalone Docker container:
docker build -t respawn-io .
docker run -p 3000:3000 respawn-ioThe same container can be served on multiple domains (e.g., respawn.io and natik.dev) via ingress. All absolute URLs in metadata point to the canonical domain (respawn.io), while relative links work on any domain.
pnpm install
pnpm run devpnpm run buildThis runs the full build pipeline:
- Copy images from content directories
- Generate OG images with Puppeteer
- Build the Astro site
- Generate RSS/Atom/JSON feeds
Feel free to use any of the code as a starting point:
- I use Obsidian as the editor, but any markdown editor works.
- Update
astro.config.mjsand site configuration with your own URLs and author info. - The
src/content/directory contains posts and daily notes. - Content schema is defined in
src/content/config.ts.
├── src/
│ ├── content/ # Content collections (posts, daily, pages, tags)
│ ├── pages/ # File-based routing
│ ├── layouts/ # Page layouts
│ ├── components/ # Astro components
│ └── styles/ # Global styles
├── lib/ # Unified/remark/rehype plugins
├── scripts/ # Build scripts (OG images, RSS, etc.)
└── public/ # Static assets
The source code in this repository is licensed under MIT. The contents of the content directories, and the articles as they are available on https://respawn.io are licensed under Creative Commons Attribution-ShareAlike 4.0.