Step 3: Run Locally

Prerequisites

  • Completed Step 2
  • src/site.json and src/content/ exist

Commands

npm run dev

Alternative direct invocation:

npx shevky --dev

Expected Output

  • Build runs first - you will see log output for each stage.
  • dist/ is generated with HTML pages.
  • Terminal prints: Serving dist on http://localhost:3000.
  • Open this URL in your browser to browse the generated site.

What Just Happened

The --dev flag in core/scripts/main.js does two things:

  1. Runs the full build via _build.execute().
  2. Starts serve@14 on the dist/ directory.

This is a static preview - there is no hot module replacement. To see changes, stop the server, rebuild, and restart.

Common Errors

ErrorFix
EADDRINUSE / port conflictStop the process using port 3000, then rerun
Template not found errorsConfirm layout/template files exist in src/templates/ and src/layouts/
No content pagesAdd at least one valid Markdown file with front matter under src/content/

Related