Astro
Tool for building websites from content such as Markdown. Ships plain HTML by default and only loads JavaScript where it is needed.
Astro builds a static website from templates and content files. Two features are decisive for a knowledge graph.
Content Collections
A folder of Markdown files becomes a queryable collection with a fixed schema. If a required field is missing or a value is not allowed, the build stops with a clear message.
Islands
The page is HTML. Interactive parts such as the graph view are individual islands whose JavaScript is only loaded on the pages that use them.
Used in
- A Callout Component for Astro A reusable Astro info box with info, note and warning variants, an optional title, social links and a members section with links per person.
- A GDPR-Compliant Google Maps Embed An Astro component that loads Google Maps only after consent, stores the decision in localStorage and builds Google and Apple Maps links from coordinates.
- A GDPR-Compliant YouTube Embed An Astro component that loads YouTube only after a click: show once, agree and remember, or just the link. No cookie, no request to Google before consent.
- Adding Notes, Links and Archives Three sections of my old Astro site: short notes rendered inline, a link log as a data collection, and one archive across every content type.
- Astro Client Islands under a Strict CSP Why Astro islands fail silently under script-src 'self', how I allowed the two hydration inlines by sha256 hash, and a deploy check for hash drift.
- Astro Justified Gallery Layout My npm package @altner/astro-justified-gallery-layout: a small justified gallery for Astro with EXIF, LQIP previews, a virtual variant and a lightbox.
- Astro SSR with Podman: From Local Setup to VPS Astro with the Node standalone adapter in a two-stage Podman container, run locally with the same compose file that later goes to the VPS.
- Building the Photo Stream The photo stream of my old Astro site: JSON sidecars next to each JPG, import.meta.glob, a justified grid and batches revealed on scroll.
- Caching Webmention Avatars Locally An Astro helper that downloads webmention avatars during the build, dedupes and sweeps them, so the CSP stays strict and readers never hit the avatar host.
- Collection Sets and Category Collections One boolean in the frontmatter told the photo sets of my old site apart from pure navigation nodes, so only finished sets reached the archive.
- Deploying Astro SSR to a VPS with Podman Moving the Astro SSR container to a fresh Debian VPS: Podman from the distro packages, a read-only deploy key and the same compose file.
- Improving Bluesky Syndication Notes as a second source, OG images compressed with Sharp below the blob limit, publish dates as timestamps and Bluesky URLs in a committed state file.
- Live Webmentions on a Static Site Webmentions rendered at build time plus a silent client-side refresh, so new likes and replies show up on a static Astro site without SSR or a redeploy.
- Marking Up Posts with Microformats2 h-entry h-entry, h-card, h-feed and u-syndication classes on articles, notes and photos of an Astro site, machine-readable without any visible change.
- My Old Astro Website My old site at adrian-altner.de: Astro with the Node adapter, typed content collections, IndieWeb features and photos as files with JSON sidecars.
- Obsidian to VPS Pipeline: Sync, Pull and Redeploy One shell script on the Mac that pulls the site repository on the VPS, rsyncs the posts from the Obsidian vault and rebuilds the Astro container.
- Obsidian Wiki-Links in Astro with a Remark Plugin A small Remark plugin that turns Obsidian [[wiki-links]] into normal links at build time, with labels, heading anchors and a fallback for unknown targets.
- Photo Albums with Astro's Content Layer Album pages on top of the photo stream of my old site: a content collection per album, covers by filename, album-scoped photo routes and a sub-nav.
- POSSE to Bluesky with the AT Protocol A Node script at the end of every deploy that posts new articles from the RSS feed to Bluesky as rich link cards, straight through the AT Protocol API.
- POSSE to Mastodon A Mastodon syndication script for articles and notes: state keyed by canonical URL, OG image uploads that fail open, backoff on 429, dry runs and batch limits.
- Receiving and Sending Webmentions Incoming webmentions through webmention.io, rendered at build time in Astro, and outgoing ones sent by webmention.app after every deploy.
- Replacing justified-layout with My Own Package How my old site swapped Flickr's unmaintained justified-layout for computeLayout() from my own package, without touching the photo tree.
- RSS News with n8n and OpenRouter Guide: n8n reads security notices, a language model rates and rewrites them, and a restricted SSH script commits them to the Git repository of a static site.
- Security Headers in Caddy A strict Content Security Policy, HSTS and no-referrer in a Caddy site block, checked with Webbkoll, securityheaders.com and the Mozilla Observatory.
- Structuring Photos as a Collection Tree How the photos of my old Astro site grew from flat albums into a recursive tree: one catch-all route, photos per node, breadcrumbs and tag pages.
- Syndicating Photos to Flickr A script that makes Flickr match the photo tree of my old site: upload, delete, move between albums, and write the Flickr ID and stats back into the sidecars.
- Syndication Links from State Astro imports the syndication state file at build time and renders u-syndication links on every post, so the frontmatter never needs a second edit.
Uses
- Markdown Simple markup language for text. Files stay readable without special software and can be converted to HTML.
Mentioned in
- Caddy as Reverse Proxy with HTTPS and a Canonical Host Caddy in front of a container on a VPS: automatic TLS from Let's Encrypt, www redirected to the bare domain, the app port closed to the outside.
- How an LLM Wiki Works How an LLM wiki works, shown on this knowledge base: Markdown in its own Git repository, a Python tool with MCP for agents, and a website that only displays it.
- Joining the IndieWeb Why I made my own domain the canonical home of everything I publish, and how rel=me and h-card verified my identity on the old site.
- Why the Photo Tree Is No Content Collection Anymore When my old Astro site went bilingual, the photo tree left the content layer: every photo and node needs both languages in one file.