This repository holds the code that is cjcoffey.com. This site is built with Astro v5.
- Install NodeJS 20
- Clone the repo
- Run
npm install
to install the dependencies - Run
npm run dev
to run the dev server - Run
npm run build
to build to the/dist
folder - Run
npm run preview
to run the preview server (serves up the contents of the/dist
folder)
Sometimes Astro can't find the collection anymore (no idea what's up with that). Most of the time, blowing away the follow directories and then re-building the site/re-running the dev server will fix it:
.astro
dist
node_modules
Collection is empty error
The collection "blog" does not exist or is empty. Ensure a collection directory with this name exists.
Cannot destructure property error
11:29:21 [ERROR] Cannot destructure property 'title' of 'data' as it is undefined.
Stack trace:
at path\to\src\layouts\BlogPost.astro:17:9