Setting up GitHub Pages with PKB-theme
This guide explains how to set up GitHub Pages for your PKB-theme repository.
Important Files
_config.yml
- Main Jekyll configuration fileGemfile
- Ruby dependencies for GitHub Pagesindex.md
- Your homepage content_layouts/
- Theme layout filesassets/
- Static files like CSS, images, etc.
Setup Steps
Configure _config.yml
- Ensure your
_config.yml
has the correct theme settings:
remote_theme: username/PKB-theme
- Ensure your
Enable GitHub Pages
- Go to your repository settings
- Navigate to “Pages” in the sidebar
- Under “Source”, select:
- Branch:
main
(or your preferred branch) - Folder:
/ (root)
- Branch:
- Click “Save”
Verify Gemfile
- Make sure your Gemfile includes:
source 'https://rubygems.org' gem 'github-pages'
Create Index Page
- Ensure you have an
index.md
in your root directory - Add front matter to specify layout:
--- layout: home ---
- Ensure you have an
Testing Locally
Install dependencies:
bundle install
Run Jekyll locally:
bundle exec jekyll serve
Visit
http://localhost:4000
to preview your site
Troubleshooting
- If pages aren’t building, check your repository’s Actions tab
- Verify your branch and publishing source settings
- Make sure all required files are committed
- Check GitHub Pages build logs for errors
Next Steps
After setup, your site will be available at https://username.github.io/PKB-theme/
. You can now:
- Customize your theme
- Add content to your site
- Configure additional settings in
_config.yml
For more details on GitHub Pages, visit the official documentation.