an Astro starter template for understated personal websites
Built with:
- SolidJS
- MDX, Remark and Unified
- Shiki Twoslash
- Tailwind CSS
- Vercel and Vercel OG
- GitHub Actions
- Click Use this template to create a new repo.
- Set
VERCEL_TOKEN
,VERCEL_PROJECT_ID
, andVERCEL_ORG_ID
secrets to deploy to Vercel from GHA (enables access to git history). - Add
OG_IMAGE_SECRET
to secure your OG image endpoint.
Inside of your Astro project, you'll see the following folders and files:
βββ posts/
β βββ rebuilding-a-blog.mdx β posts written in MDX
βββ public/ β static assets apart from images
βββ src/
β βββ build-time/* β remark plugins
β βββ global-styles/* β fonts, body and prose styles
β βββ layouts/
β β βββ BaseLayout.astro β UI shared between all pages
β β βββ PostLayout.astro β layout for all posts
β βββ lib/* β reusable utils and UI components
β βββ images/* β pictures (need to be here to be optimized by Astro Image)
β βββ pages/
β β βββ [path].astro β Astro dynamic route for posts, supplies MDX components
β β βββ index.astro β index page, lists all posts
β βββ env.d.ts
β βββ types.ts
βββ astro.config.ts
βββ package.json
βββ postcss.config.cjs
βββ tailwind.config.cjs β Tailwind config, colors, fonts
βββ tsconfig.json
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
pnpm install |
Installs dependencies |
pnpm run dev |
Starts local dev server at localhost:3000 |
pnpm run build |
Build your production site to ./dist/ |
pnpm run preview |
Preview your build locally, before deploying |
pnpm run astro ... |
Run CLI commands like astro add , astro check |
pnpm run astro --help |
Get help using the Astro CLI |
-
Click Use this template to create a new repo.
-
Clone the repository, install with
pnpm install
and run withpnpm dev
. -
Style it and personalize however you like π
-
Set
VERCEL_TOKEN
,VERCEL_PROJECT_ID
, andVERCEL_ORG_ID
secrets to deploy to Vercel from GHA (what enables access to git history). (SettingsβSecrets)- Alternatively β if all your blog posts have a
date
in frontmatter, you don't need to deploy through workflows/ci.yml. Feel free to remove the deploy steps from the YML file and connect Vercel/Netlify integration. Go toderivedTitleAndDatePlugin
function and removeexecSync("git log")
from it. (TODO: Can we make it more convenient?)
- Alternatively β if all your blog posts have a
-
Generate a passphrase for
OG_IMAGE_SECRET
to secure your OG image endpoint, and add it to Actions Secrets.