Skip to content

dually8/cj-coffey

Repository files navigation

cjcoffey.com

This repository holds the code that is cjcoffey.com. This site is built with Astro v5.

Getting Started

  1. Install NodeJS 20
  2. Clone the repo
  3. Run npm install to install the dependencies
  4. Run npm run dev to run the dev server
  5. Run npm run build to build to the /dist folder
  6. Run npm run preview to run the preview server (serves up the contents of the /dist folder)

Tip

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

Error Examples

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

Resources