· John Dummy · 1 min read
Installation & Setup Guide
Get your blog up and running locally for development and content authoring.
This guide will help you set up the blog code repository on your local machine for development and writing.
Prerequisites
- Node.js: Version 18.17.1 or higher.
- npm: Included with Node.js.
- Git: For version control.
- uv & direnv: (Optional, but recommended for Jupyter support).
Getting Started
Clone the Repository:
git clone https://github.com/iot49/blog-code.git cd blog-codeInstall Dependencies:
npm installContent Repository: This blog separates code from content. Ensure your
blog-contentrepository is located adjacent to theblog-codefolder:# Structure should look like: # /parent-dir # ├── blog-code/ # └── blog-content/Environment Variables: Configure your
.envfile for local development and deployment. See the Setting up Environment Variables guide for details.
Development Workflow
Local Preview
To start the Astro development server and preview your changes in real-time:
./bin/previewThe site will be available at http://localhost:4321.
Running Tests
Before pushing any changes, ensure all tests pass. This script checks linting, types, and verifies that no private content is leaked in the build:
./bin/testBuild & Deploy
To build the site for production:
./bin/deployThis script syncs your latest content, builds the static site, and prepares it for Cloudflare Pages.