khalido.org

every blog needs subheader text

Astro

This website now runs on Astro, and uses tailwindcss and mdx.

It previously used an overly complicated python script I wrote, but it kept getting longer, so rather than spend time on the blog engine, using a tool like Astro makes it easier to just write.

Astro basics

Install by:

# create a new project with npm
npm create astro@latest

Start the dev server by:

npm run dev           # only exposes to your machine
npm run dev -- --host # expose on your local network, handy for checking on a phone/tablet

Why npm has this extra -- before the --host???

Upgrade astro by npx @astrojs/upgrade

Setup integrations:

  • mdx - to use components inside posts
  • tailwind - style all the things
  • svelte - for search etc
npx astro add mdx
npx astro add tailwind
npx astro add svelte
posted
tagged: astro