Yet another blog by rexarski, but this time built with Astro. Theme forked from Chris Williams' astro-theme-cactus.
The site is deployed on Netlify. A decent amount configuration to do before everything is up and running. Kudos to Chris for writing a great documentation.
See rqiu.dev for my other blog posts.
- Astro v4 Fast 🚀
- TailwindCSS Utility classes
- Accessible, semantic HTML markup
- Responsive & SEO-friendly
- Dark / Light mode, using Tailwind and CSS variables
- Astro Assets Integration for optimised images
- MD & MDX posts
- Satori for creating open graph png images
- Pagination
- Automatic RSS feed
- Webmentions
- Shiki code syntax styling
- Auto-generated sitemap
- Pagefind static search library integration
- Astro Icon svg icon component
Use pnpm
or npm
or yarn
:
Command | Action |
---|---|
pnpm install |
Installs dependencies |
pnpm dev |
Starts local dev server at localhost:3000 |
pnpm build |
Build your production site to ./dist/ |
pnpm postbuild |
Pagefind script to build the static search of your blog posts |
pnpm preview |
Preview your build locally, before deploying |
pnpm sync |
Generate types based on your config in src/content/config.ts |
My go-to post frontmatter template:
---
title: "Example Cover Image"
description: "This post is an example of how to add a cover image"
publishDate: "04 July 2023"
updatedDate: "14 August 2023" # optional
coverImage: # optional
src: "./cover.png"
alt: "Astro build wallpaper"
tags: ["test", "image"]
ogImage: "/social-card.png"
draft: true # this post should only be accessible in a dev environment, as well as any tags that are unique to this post.
---
MIT