Local Development Setup — bryceag11.github.io

Local Development Setup — bryceag11.github.io

Quick Reference

MethodCommandURL
Native Rubybundle exec jekyll serve -l -H localhosthttp://localhost:4000
Dockerdocker compose uphttp://localhost:4000
VS Code DevContainerOpen folder → “Reopen in Container”http://localhost:4000

Prerequisites

# Install Ruby, ruby-dev, and build tools
sudo apt-get install -y ruby ruby-dev build-essential

# Verify
ruby --version   # needs ~3.x

Install Dependencies

cd ~/bryceag11.github.io

# Install bundler (if not present)
gem install bundler --user-install

# Make sure user gem bin is on PATH (add to ~/.bashrc to persist)
export PATH="$HOME/.local/share/gem/ruby/3.2.0/bin:$PATH"

# Install gems locally to the project (one-time setup)
bundle config set --local path 'vendor/bundle'
bundle install

Troubleshooting: If bundle install fails with “can’t find header files for ruby”, you’re missing ruby-dev:

sudo apt-get install -y ruby-dev

Serve Locally

bundle exec jekyll serve -l -H localhost
  • -l enables live reload (auto-refreshes browser on file changes)
  • -H localhost binds to localhost only
  • Site is at http://localhost:4000
  • Press Ctrl+C to stop

Build Without Serving

bundle exec jekyll build

Output goes to _site/ (gitignored).


Option 2: Docker

Prerequisites

  • Docker and Docker Compose installed

Run

cd ~/bryceag11.github.io
docker compose up

That’s it. Site is at http://localhost:4000 with live reload.

To rebuild the image after Gemfile changes:

docker compose up --build

Option 3: VS Code DevContainer

  1. Install the Dev Containers extension in VS Code
  2. Open ~/bryceag11.github.io in VS Code
  3. Click the popup “Reopen in Container” (or Cmd/Ctrl+Shift+P → “Dev Containers: Reopen in Container”)
  4. Jekyll auto-starts — visit http://localhost:4000

Common Workflows

Writing/Editing Content

Content TypeWhere to Edit
Blog posts_posts/YYYY-MM-DD-title.md
Pages_pages/ (about, cv, etc.)
Publications_publications/
Teaching_teaching/
Talks_talks/
Portfolio_portfolio/
Navigation_data/navigation.yml
CV data_data/cv.json
Site config_config.yml

Creating a New Blog Post

# Create a new post file
touch _posts/2026-03-12-my-new-post.md

Add frontmatter at the top:

---
title: 'My New Post'
date: 2026-03-12
permalink: /posts/2026/03/my-new-post/
tags:
  - research
  - math
---

Your content here in Markdown.

Important Notes

  • _config.yml changes require a server restart — Jekyll doesn’t live-reload config changes.
  • The vendor/ directory is gitignored — each machine installs its own gems.
  • Gemfile.lock is also gitignored in this project.
  • Photography images go in photography/ and are indexed via _data/photography.yml.

Pushing Changes

git add -A
git commit -m "Update site content"
git push origin master

GitHub Pages will auto-build and deploy from the master branch.