Working Locally
You do not need any of this. You can build, edit, and publish an entire Xanthan site from your browser and never install a thing. This page is here for when you want to work faster, not because the work requires it.
Two things change once a site gets busy. Every push to GitHub means waiting a minute or two to see whether an edit worked, and the browser editor gets awkward when you’re moving many files at once. Working on your own computer removes both problems: edit, save, refresh, see it immediately.
There are two halves to this, and they are independent. You can set up local editing without local previewing, or the reverse.
Editing on your own computer
For frequent editing, working on your own computer is faster and more flexible. You’ll need two free tools.
1. Install the tools
- GitHub Desktop — keeps your local files and GitHub repository in sync
- Visual Studio Code — a proper code editor with file management, search/replace, and AI assistant support
2. Clone your repository
- In GitHub Desktop, go to File > Clone Repository
- Find your site’s repository in the GitHub.com tab
- Select it and click Clone
- Choose where on your computer you want the files
3. Edit in VS Code
- In GitHub Desktop, click “Open in Visual Studio Code”
- VS Code opens with your full project loaded
- Edit files, add images, rename and move things—all with a real file manager
4. Commit and push
When you save a file, GitHub Desktop notices the change automatically:
- Switch to GitHub Desktop
- Your changed files appear in the left sidebar
- Add a short summary of what you changed
- Click “Commit to main”
- Click “Push origin” to send changes to GitHub
Your site rebuilds automatically in about a minute.
Before you commit
A quick checklist to prevent common errors:
- Matching quotes in include blocks (
"..."not"...') - File paths that match actual file locations exactly
- Include blocks with proper delimiters (
{% ... %}) - Front matter properly formatted between
---markers
Browser or local?
| GitHub editor | Local editing | |
|---|---|---|
| Setup | None | Install 2 apps |
| Best for | Quick edits, single pages | Frequent changes, multiple files |
| File management | Limited | Full (drag, drop, rename, move) |
| Works offline | No | Yes |
| AI assistance | Limited | Full (Copilot, Cursor, etc.) |
| Instant preview | No | Yes (with Docker, below) |
Most people start in the browser and move to local editing as their site grows. There is no wrong answer—use whatever keeps you productive.
Previewing with Docker
The rest of this page covers instant local preview. It is the more involved half, and the one you are least likely to need early on.
What Docker Does for You
The issue: Every time you push changes to GitHub, you wait while GitHub Pages rebuilds your site. If you made a typo or something doesn’t look right, you have to fix it, push again, and wait again.
The solution: Docker runs Jekyll (the software that builds your site on GitHub Pages) directly on your computer. You see changes instantly in your browser—no pushing, no waiting, no surprises with your live site.
Think of Docker as: A self-contained mini-computer that already has everything set up to run your site. You don’t need to install Ruby, Jekyll, or any complicated dependencies. Docker handles all that.
Step 1: Install Docker Desktop
Docker Desktop is the app that makes this all work.
For Mac:
- Go to https://www.docker.com/products/docker-desktop
- Click Download for Mac
- Open the downloaded
.dmgfile and drag Docker to your Applications folder - Open Docker from Applications
- Follow the setup prompts (you can use the default settings)
- Docker Desktop will start running (you’ll see a whale icon in your menu bar)
For Windows:
- Go to https://www.docker.com/products/docker-desktop
- Click Download for Windows
- Run the installer
- Follow the setup prompts (you can use the default settings)
- Restart your computer when prompted
- Launch Docker Desktop from the Start menu
- Docker Desktop will start running (you’ll see a whale icon in your system tray)
Step 2: Open Your Terminal
You’ll need to use the terminal (Mac/Linux) or command prompt (Windows) to run Docker commands.
On Mac:
- Press
Command + Spaceto open Spotlight - Type “Terminal” and press Enter
On Windows:
- Press the Windows key
- Type “Command Prompt” or “PowerShell”
- Press Enter
Step 3: Navigate to Your Site Folder
You need to “go into” your website folder using the terminal. Here’s how:
- In the terminal, type
cd(that’s “cd” followed by a space—don’t press Enter yet!) - Find your site folder in Finder (Mac) or File Explorer (Windows)
- Drag the folder into the terminal window
- The full path to your folder appears after
cd - Now press Enter
Example of what you’ll see:
cd /Users/yourname/Documents/my-site
How to tell it’s working: Your terminal prompt should now show your site folder name.
Step 4: Run Your Site with Docker
Now for the magic! Copy and paste this command into your terminal and press Enter:
docker run --rm -it -p 4000:4000 -v "$(pwd):/srv/jekyll" jekyll/jekyll:4.2.0 jekyll serve --force_polling --livereload
What this command does (you don’t need to memorize this):
docker run- Tells Docker to run a containerjekyll/jekyll:4.2.0- Uses the official Jekyll Docker image-p 4000:4000- Makes your site available atlocalhost:4000-v "$(pwd):/srv/jekyll"- Connects your site folder to the containerjekyll serve- Runs the Jekyll server--force_polling- Watches for file changes on your computer--livereload- Automatically refreshes your browser when files change
First time running? Docker will download the Jekyll image (about 200MB). This takes a few minutes but only happens once.
What you’ll see:
Server address: http://0.0.0.0:4000/
Server running... press ctrl-c to stop.
When you see this, your site is ready!
Step 5: View Your Site
- Open your web browser
- Go to:
http://localhost:4000 - Your site appears!
Now the real power: Make a change to any file, save it, and watch your browser automatically refresh with the changes. No waiting!
Daily Workflow
Once you have Docker installed, here’s your typical workflow to edit your site:
- Start Docker Desktop (if not already running)
- Open terminal and navigate to your site folder:
cd /path/to/your/site - Run the Docker command:
docker run --rm -it -p 4000:4000 -v "$(pwd):/srv/jekyll" jekyll/jekyll:4.2.0 jekyll serve --force_polling --livereload - Open browser to
http://localhost:4000 - Edit files in VS Code and watch changes appear instantly
- When done, press
Ctrl + Cin the terminal to stop the server - Commit and push your changes to GitHub (see Editing on your own computer above)
Troubleshooting
“Docker is not running”
Fix: Make sure Docker Desktop is open and running. Look for the whale icon in your menu bar/system tray.
“Port 4000 is already in use”
Fix: You probably already have Jekyll running. Either:
- Close the other terminal window running Jekyll, or
- Use a different port: Change
-p 4000:4000to-p 4001:4000and visithttp://localhost:4001
“Permission denied” or “Cannot connect to Docker daemon”
Fix (Mac/Linux): Try adding sudo before the command:
sudo docker run --rm -it -p 4000:4000 -v "$(pwd):/srv/jekyll" jekyll/jekyll:4.2.0 jekyll serve --force_polling --livereload
Fix (Windows): Make sure Docker Desktop is running and you’ve restarted your computer after installation.
Site doesn’t refresh automatically
Fix: The --livereload flag should handle this, but if it doesn’t work:
- Manually refresh your browser after saving files
- Make sure you’re using the full Docker command with
--force_polling --livereload
Changes don’t appear
Fix:
- Check the terminal for error messages
- Make sure you saved the file in VS Code
- Wait a second or two for Jekyll to rebuild
- Try a hard refresh in your browser:
Ctrl + Shift + R(Windows/Linux) orCmd + Shift + R(Mac)
“Error: no such file or directory”
Fix: Make sure you’re in the correct folder. Type ls (Mac/Linux) or dir (Windows) and you should see folders like _layouts, assets, docs, etc. If not, navigate to the correct folder using cd.
Advantages of Local Development
Instant feedback
See changes immediately—no waiting for GitHub Pages to rebuild (which takes 2-3 minutes each time).
Catch errors before publishing
If something breaks, you’ll see it locally before your live site is affected. No more pushing broken code!
Work offline
Once Docker has downloaded the Jekyll image, you can work without internet. Only connect when you’re ready to push changes to GitHub.
Test complex changes
When making big changes (new layouts, CSS refactoring, etc.), you can experiment freely and make sure everything works before going live.
Better debugging
Error messages appear immediately in your terminal, making it much easier to figure out what went wrong.
When to Use Local Development
Use local development when:
- Making multiple changes and want to see results quickly
- Testing new features or layouts
- Working on CSS/design changes
- Adding complex components
- Learning and experimenting
Stick with GitHub editing when:
- Making small text changes (fixing a typo, updating a date)
- Working on a computer where you can’t install Docker
- Making quick edits from a mobile device
Next Steps
Now that you have local development working:
- Explore Using AI Assistance - AI tools work great with local development
- Learn about Colors & Fonts - Easier to experiment when you can see changes instantly
- Check out the Typography and Images pages - Test different styles locally before publishing
Summary
What we did:
- Installed Docker Desktop
- Opened terminal and navigated to site folder
- Ran one Docker command to start local server
- Viewed site at
localhost:4000
The command to remember:
docker run --rm -it -p 4000:4000 -v "$(pwd):/srv/jekyll" jekyll/jekyll:4.2.0 jekyll serve --force_polling --livereload
The workflow:
- Start Docker
- Run command
- Edit files
- See changes instantly
- Push to GitHub when ready
You now have a professional development workflow that makes building your site much faster and more enjoyable!