How to test a blog for GitHub Pages locally

Posted by Java developer blog on December 8, 2020

Overview

In the post, we are going to discuss how to test a blog on GitHub Pages locally.

Test blog locally

In my opinion, it is better to test a blog locally before publishing when you configure it the first time.

Follow the steps below to test a GitHub Pages blog locally:

  • Install ruby

For windows, you could download here.

  • Install the jekyll and bundler gems:
1
gem install jekyll bundler
  • Install dependencies based on Gemfile file:
1
bundle install
  • Run server locally:
1
bundle exec jekyll serve
  • Browse to http://localhost:4000

Conclusion

We have described how to test a blog for GitHub Pages locally.