Astro Butterfly brings the look of the popular Hexo theme Butterfly to Astro. It builds to plain static HTML and keeps JavaScript to what each page actually uses.
Features
- Butterfly layout: post cards, author card, announcement, category, tag-cloud and archive widgets, site stats, a sticky table of contents and floating action buttons
- Light and dark modes that follow the system, plus a reading mode and a one-column layout
- Mac-style code blocks rendered at build time by Expressive Code, with titles, line highlights, diff marks, copy, folding and an expand bar for long blocks
- Callouts, folding blocks, tabs, coloured text, spoilers, tooltips and site cards, written in standard Markdown (GitHub alerts and directives)
- Full-text search with Pagefind, built at build time with no external service
- Atom feed, sitemap, robots.txt, web manifest, Open Graph tags, KaTeX maths, image lightbox and captions, reading time
- Optional services that switch on when you add a key: Twikoo comments, a weather clock, an APlayer music player and visitor counters
- About 19 KB of JavaScript on first load. Comments, the lightbox, search and the music player load only when used.
- Keyboard accessible, respects reduced motion, and works with or without a sub-path (GitHub Pages workflow included)
- Migration tools for Hexo Butterfly blogs: front matter, permalinks and heading anchors carry over, and one command converts tag plugins









