Jekyll Documentation Deployment
Overview
This project uses a dual-configuration approach for Jekyll deployment:
- Local development: Uses local
just-the-docsgem (fast, no network required) - GitHub Pages: Uses
remote_themeplugin (required for GitHub Pages)
Configuration Files
_config.yml (Base Configuration)
Contains all site settings and uses theme: just-the-docs for local development.
_config_prod.yml (Production Override)
Overrides the local theme with remote_theme: just-the-docs/just-the-docs@v0.7.0 for GitHub Pages deployment.
Local Development
cd docs
# Development mode (with live reload)
./serve.sh dev
# Production build test (attempts remote_theme, may fail locally due to SSL)
./serve.sh prod
Deployment to GitHub Pages
Deployment is automatic via GitHub Actions when changes are pushed to the main branch.
The workflow:
- Checks out code
- Installs Ruby 3.3 and dependencies
- Builds with:
jekyll build --config _config.yml,_config_prod.yml - Deploys to GitHub Pages
Key Build Command:
bundle exec jekyll build --config _config.yml,_config_prod.yml --baseurl "/solana-starter-program"
This command merges both configs (left to right), where _config_prod.yml overrides values from _config.yml.
How Config Override Works
Jekyll’s --config flag accepts multiple files separated by commas:
--config file1.yml,file2.yml,file3.yml
Values are merged left-to-right, with later files overriding earlier ones:
_config.yml:
theme: just-the-docs
plugins:
- jekyll-seo-tag
- jekyll-sitemap
_config_prod.yml:
remote_theme: just-the-docs/just-the-docs@v0.7.0
theme: null
plugins:
- jekyll-seo-tag
- jekyll-sitemap
- jekyll-remote-theme
- jekyll-github-metadata
Result (merged):
remote_theme: just-the-docs/just-the-docs@v0.7.0
theme: null
plugins:
- jekyll-seo-tag
- jekyll-sitemap
- jekyll-remote-theme
- jekyll-github-metadata
Why This Approach?
- Local Speed: Dev mode uses local gem, no network downloads
- GitHub Compatibility: GitHub Pages requires
remote_themeplugin - Single Source of Truth: Main config stays in
_config.yml - Clean Overrides: Production changes isolated in
_config_prod.yml
Troubleshooting
Local Production Build Fails (SSL Error)
This is expected. The remote_theme plugin tries to download the theme from GitHub, which may fail locally due to SSL certificate verification. This works fine in GitHub Actions.
Theme Not Loading on GitHub Pages
- Verify
jekyll-remote-themeplugin is inGemfile - Check
_config_prod.ymlhas correctremote_themevalue - Ensure GitHub Actions workflow uses
--config _config.yml,_config_prod.yml - Verify repository settings: Settings > Pages > Build and deployment > Source = “GitHub Actions”
Changes Not Appearing
- Wait 1-2 minutes for GitHub Actions to complete
- Check Actions tab for build errors
- Clear browser cache (Cmd+Shift+R)
Repository Settings
Ensure GitHub Pages is configured correctly:
- Go to: Settings > Pages
- Source: Select “GitHub Actions” (not “Deploy from a branch”)
- Workflow will automatically deploy on push to
main
Manual Deployment
If you need to manually trigger deployment:
- Go to: Actions tab
- Select “Deploy Jekyll site to Pages” workflow
- Click “Run workflow” > “Run workflow”