GitHub Pages Setup Guide¶
This guide explains how to configure GitHub Pages for the FinWiz documentation.
Quick Setup¶
1. Enable GitHub Pages¶
- Go to your GitHub repository settings
- Navigate to Settings → Pages
- Under Build and deployment:
- Source: Deploy from a branch
- Branch:
main - Folder:
/docs - Click Save
2. Verify Deployment¶
After enabling GitHub Pages, GitHub will automatically:
- Build your site using Jekyll
- Deploy to
https://[username].github.io/finwiz - Update the deployment status in the repository
You can check deployment status:
- Go to Actions tab to see build progress
- Check the Environments section for deployment history
3. Custom Domain (Optional)¶
To use a custom domain:
- Add a
CNAMEfile to thedocs/directory:
- In GitHub Settings → Pages:
- Enter your custom domain
-
Enable "Enforce HTTPS"
-
Configure DNS:
- Add a
CNAMErecord pointing to[username].github.io - Or add
Arecords pointing to GitHub Pages IPs
Local Development¶
Preview Documentation¶
The Makefile provides convenient commands:
Bash
# Start local preview (uses Jekyll if installed, otherwise Python HTTP server)
make docs-serve
# View at http://localhost:8000 (HTTP server) or http://localhost:4000 (Jekyll)
With Jekyll (Recommended)¶
Install Jekyll for full GitHub Pages compatibility:
Bash
# macOS
brew install ruby
gem install jekyll bundler
# Ubuntu/Debian
sudo apt-get install ruby-full build-essential zlib1g-dev
gem install jekyll bundler
# Then serve
cd docs
jekyll serve --baseurl '' --livereload
Simple HTTP Server¶
If you don't want to install Jekyll:
Documentation Structure¶
Text Only
docs/
├── _config.yml # Jekyll configuration
├── index.md # Homepage
├── README.md # Project overview
├── DEVELOPER_GUIDE.md # Development guide
├── tutorials/ # Learning-oriented guides
├── how-to/ # Problem-solving guides
├── reference/ # Technical references
└── explanations/ # Understanding-oriented content
Key Files¶
_config.yml¶
Jekyll configuration at the project root:
- Site metadata (title, description)
- Theme configuration
- Build settings
- Collections and navigation
.nojekyll¶
Prevents GitHub from ignoring files starting with underscore.
Front Matter¶
Add YAML front matter to markdown files:
Validation¶
Lint Markdown¶
Validate Structure¶
CI/CD Validation¶
GitHub Actions automatically validates documentation on every push:
- Markdown linting
- Broken link checking
- Structure validation
- MkDocs artifact detection
See .github/workflows/docs-validation.yml
Troubleshooting¶
Pages Not Building¶
- Check Actions tab for build errors
- Verify
docs/directory containsindex.md - Ensure
_config.ymlis valid YAML - Check that branch and folder are correctly configured
404 Errors¶
- Verify all relative links use correct paths
- Check file extensions (
.mdvs.html) - Ensure case sensitivity matches file names
Styling Issues¶
- GitHub Pages uses Jekyll with limited theme support
- Use the
minimatheme (default) or add custom CSS - Test locally with Jekyll before deploying
Local Preview Not Working¶
- Install Jekyll:
gem install jekyll bundler - Or use simple HTTP server:
python3 -m http.server 8000 - Check for port conflicts (default: 8000 or 4000)
Best Practices¶
- Keep docs/ clean: Remove build artifacts
- Use relative links: For portability
- Test locally: Before pushing
- Validate: Run
make docs-validate - Follow Diátaxis: Organize content by purpose
Resources¶
Migration from MkDocs¶
FinWiz previously used MkDocs. The migration to GitHub Pages/Jekyll includes:
Removed¶
mkdocs.ymlconfiguration.pagesnavigation filesdocs/includes/directory- MkDocs-specific make targets
Added¶
_config.ymlJekyll configuration.nojekyllfile- Simplified make targets
- GitHub Actions validation
Updated¶
- All documentation references
- Navigation structure
- Build and deployment process
No changes needed to existing markdown content!