Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A minimal Astro blog theme with abbrlink post creation, SVG transparency fixing, and PWA icon/favicon generation.
astro blog is a minimal, MIT-licensed blog theme for the Astro framework that ships with command-line tooling for creating posts, cleaning SVG assets, and generating PWA icons and favicons.
astro blog is a blog theme built on Astro and managed through pnpm, designed for developers who want a lightweight, script-driven static site. It takes Markdown files as content input — stored under a _src/data directory — and produces a static blog with permalink support via an abbrlink frontmatter field. The project is open source under the MIT License, so it can be freely reused, modified, and embedded in other projects. The repository includes three Node.js helper scripts: create.cjs for post scaffolding, fix-svg-transparent.mjs for removing background rectangles from SVGs, and generate-icons.mjs for producing PWA icons and a favicon.
pnpm run new --title='title-test' generates a new Markdown file under _src/data with a frontmatter block containing title, a timestamped date, and a generated abbrlink hash, so every post gets a stable, URL-friendly permalink.create.cjs script accepts a dir parameter, which defaults to drafts when not supplied, letting users control whether new posts land in drafts or elsewhere.pnpm run svg invokes fix-svg-transparent.mjs, which scans SVG files in _src/assets and removes the background rect element, producing transparent SVGs suitable for logos and illustrations.pnpm run icons generates pwa-48.png, pwa-64.png, pwa-72.png, pwa-96.png, pwa-192.png, pwa-512.png, and favicon.svg in the _public directory; adding the --padding flag creates versions with padding for situations like maskable icons.abbrlink generation to keep URLs unchanged even when titles are edited.pnpm run new --title='my-first-post' to create a draft Markdown file with frontmatter and a permalink hash already filled in.pnpm run svg to automatically strip background rectangles from logo SVGs stored in _src/assets, making them transparent.pnpm run icons --padding to generate padded PWA icons at seven sizes plus a favicon, matching common app manifest requirements.The workflow is centered on three pnpm scripts. First, pnpm run new scaffolds a Markdown post in _src/data, generating a frontmatter block with a timestamp and a unique abbrlink hash. Then pnpm run svg processes SVG files in _src/assets to remove background rectangles and make them transparent. Finally, pnpm run icons (optionally with --padding) creates PWA icons and a favicon in _public, ready for use in a web manifest and HTML head.
Run pnpm run new --title='your-title' from the project root. The create.cjs script will generate a Markdown file in _src/data (or the directory you pass via the dir parameter, which defaults to drafts) with frontmatter that includes the title, the current date in ISO format, and an automatically generated abbrlink.
pnpm run svg do?It runs fix-svg-transparent.mjs, which processes every SVG file inside _src/assets and removes the background rect element from each one. This produces transparent SVGs, which is useful when you need logos or illustrations that don't have a filled background.
pnpm run icons do?It runs generate-icons.mjs to create PWA icons at sizes 48, 64, 72, 96, 192, and 512 pixels, plus a favicon.svg, in the _public directory. Add the --padding flag to generate versions with extra padding, which helps with maskable icon requirements.
Yes, astro blog is released under the MIT License, so it is free to use, modify, and distribute for personal or commercial purposes as long as you retain the license notice.
