Skip to content

How to Run Locally

Running the Dijkstra Blog locally allows contributors to:

  • Preview blog posts before publishing
  • Test formatting and layout
  • Make structural or design improvements
  • Ensure content renders correctly

The blog is built using Astro, so the local setup is lightweight and fast.


Make sure you have the following installed:

  • Node.js (v18 or later recommended)
  • npm (comes with Node.js)
    or
  • pnpm / yarn (optional alternative package managers)

Terminal window
git clone https://github.com/Dijkstra-Edu/Blog.git
cd Blog

Install all required project packages:

Terminal window
npm install

If using pnpm:

Terminal window
pnpm install

Run the local development server:

Terminal window
npm run dev

Astro will start a local server, typically at:

👉 http://localhost:4321

Open this URL in your browser to view the blog.


You can now:

  • Add or edit Markdown blog files
  • Update layouts or components
  • Modify styles

The development server supports hot reload, meaning changes appear instantly without restarting the server.


To verify the production build:

Terminal window
npm run build

To preview the production version locally:

Terminal window
npm run preview

Port already in use
If port 4321 is busy, Astro will suggest another available port.

Dependencies not installing
Try deleting node_modules and package-lock.json, then run:

Terminal window
npm install

You should run the project locally when:

  • Writing or editing blog posts
  • Working on layout or UI changes
  • Fixing formatting issues
  • Testing before opening a Pull Request

Local setup ensures contributors can safely test their work before it goes live. It keeps the publishing process smooth while maintaining quality and consistency across the blog.