GitHub Blog FAQ - Common Questions and Solutions
1. Enabling Google Search
1.1 Activate sitemap
Modify your _config.yml
:
plugins: ['jekyll-paginate', 'jekyll-sitemap', 'jekyll-include-cache', 'jekyll-gist']
1.2 Add robots.txt
Create a robots.txt
file in your root directory:
User-agent: *
Allow:/
Sitemap: https://jayleekr.github.io/sitemap.xml
1.3 Register sitemap to Google Search Console
- Go to https://www.google.com/webmasters
- Click SEARCH CONSOLE
- Add your site and verify ownership
- Submit your sitemap URL
2. Jekyll Related Issues
2.1 Installing dependencies for local blog testing
If you want to test your Jekyll blog locally, you’ll need these dependencies:
$ sudo apt-get install -y gem
$ sudo gem install jekyll bundler tzinfo tzinfo-data minima
2.2 Installing a Theme
Let’s install the minimal-mistakes theme as an example:
- First, add the minimal-mistakes theme to your Gemfile:
gem "minimal-mistakes-jekyll"
- Install the bundle:
$ bundle install
- Add the theme to your
_config.yml
file:
theme: minimal-mistakes-jekyll
2.3 Running Jekyll
$ jekyll serve
Configuration file: /home/jayleekr/workspace/00_codes/07_blog/_config.yml
Source: /home/jayleekr/workspace/00_codes/07_blog
Destination: /home/jayleekr/workspace/00_codes/07_blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.823 seconds.
Auto-regeneration: enabled for '/home/jayleekr/workspace/00_codes/07_blog'
Server address: http://127.0.0.1:4000
Server running... press ctrl-c to stop.
Your blog should now be accessible at http://127.0.0.1:4000
!
2.4 Jekyll Version Compatibility Issues
This happens when your project version doesn’t match your installed Jekyll version.
You can resolve this by managing gem dependencies properly:
$ sudo gem install bundler
$ bundle install
$ bundle exec jekyll serve
Configuration file: /home/jayleekr/workspace/00_codes/07_blog/_config.yml
Source: /home/jayleekr/workspace/00_codes/07_blog
Destination: /home/jayleekr/workspace/00_codes/07_blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.823 seconds.
Auto-regeneration: enabled for '/home/jayleekr/workspace/00_codes/07_blog'
Server address: http://127.0.0.1:4000
Server running... press ctrl-c to stop.
Using bundle exec
ensures you’re running Jekyll with the exact gem versions specified in your Gemfile.lock, avoiding compatibility issues.
Pro Tips
- Always use
bundle exec jekyll serve
instead of justjekyll serve
to avoid version conflicts - Keep your gems updated with
bundle update
- Test your blog locally before pushing to GitHub Pages
- Use GitHub Pages supported plugins to avoid build failures
Hope this helps with your GitHub blog setup! 🚀
Share this article
Found this helpful? Share it with your network
관련 글
Join the Discussion
Share your thoughts and connect with other readers
댓글
GitHub 계정으로 로그인하여 댓글을 남겨보세요. 건설적인 의견과 질문을 환영합니다!
댓글을 불러오는 중...
댓글을 불러올 수 없습니다.