3
votes

I'm starting to host my personal blog on GitHub pages and Jekyll seems to be a good choice. But do I have to install Jekyll on my computer? I think Jekyll just provides a way of previewing my site locally. Is it possible to host my website by the use of GitHub pages only?

2
That's totally possible to not use Jekyll at all. GitHub Pages uses Jekyll to render your documents anyway, and you don't need to do anything special. However if you want to preview your site locally, installing Jekyll will help. You can skip that of you don't mind constantly committing to your github repo to preview the changes on Github Pages live. - Terry

2 Answers

5
votes

Concerning your title question:

GitHub pages is GitHub's static site hosting service for serving your personal pages or projects straight from your GitHub repository. Jekyll is a static site generator that can generate your site from templates (read below).

GitHub Pages self-definition:

GitHub Pages are public webpages hosted and published through [GitHub's] site. Reference

Jekyll self-definition:

Jekyll is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through a converter (like Markdown) and our Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server. Jekyll also happens to be the engine behind GitHub Pages, which means you can use Jekyll to host your project’s page, blog, or website from GitHub’s servers for free. Reference

Concerning your questions:

Do I have to install Jekyll on my computer?

You don't have to. However, without Jekyll installed, you can only preview your site through commits to your repository. If you would like to preview the site locally, you will need to install Jekyll. Here's a link for setting up GitHub pages site locally with Jekyll (make sure to select the correct OS).

Details: Jekyll's engine is already incorporated into GitHub pages, so it will run jekyll build internally. Pushing a commit to your repository will trigger the Jekyll engine to (re)build your site. If you wish to serve and view locally, you will still need to run jekyll build jekyll serve etc.

Is it possible to host my website by the use of GitHub pages only?

Yes. While GitHub pages offers native support for the precompiling of various intermediate languages (e.g., Sass & CoffeeScript), any other languages not covered will require precompiling on your part before it is able to be served properly on GitHub pages.

0
votes

Yes it is possible. GitHub Pages support the latest version of Jekyll. You may refer to this
https://blog.github.com/2014-07-30-github-pages-now-runs-jekyll-2-2-0/

  • Native Sass & CoffeeScript support - Simply commit a .coffee, .sass or .scss file to your site’s repository, and GitHub Pages will transparently output JavaScript or CSS when your site is published.
  • Kramdown as the default Markdown engine - In addition to better error handling, Kramdown supports MathJax, fenced code blocks, nested lists, tables, and much more.
  • Collections - With collections, Jekyll is no longer limited to just posts and pages—it can now publish all kinds of different documents, such as code methods, team members, or your favorite open source projects.
  • JSON data - .json files in the _data directory now get read in and are exposed to Liquid templates as the site.data namespace (along with .yml files).