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 its Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server. Jekyll is also 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.
Jekyll's website is at http://jekyllrb.com/, and documentation can be found at http://jekyllrb.com/docs/home/.
The Jekyll gem makes a jekyll executable available to you in your Terminal window. You can use this command in a number of ways:
$ jekyll build
# => The current folder will be generated into ./_site
$ jekyll build --destination <destination>
# => The current folder will be generated into <destination>
$ jekyll build --source <source> --destination <destination>
# => The <source> folder will be generated into <destination>
$ jekyll build --watch
# => The current folder will be generated into ./_site,
# watched for changes, and regenerated automatically.
Jekyll also comes with a built-in development server that will allow you to preview what the generated site will look like in your browser locally.
$ jekyll serve
# => A development server will run at http://localhost:4000/
# Auto-regeneration: enabled. Use `--no-watch` to disable.
To create a new Jekyll Post, create a new file on _posts
directory with the format
YYYY-MM-DD-title.MARKUP
Replace MARKUP
with the file extension for the language you want to use. This is usually Markdown(.md or .markdown) or HTML(.html).
_posts/2017-01-01-hello-jekyll.md
To create a new Jekyll Page, create a new file on any folder or directory not excluded by Jekyll in your project directory.
about.html
contact/company_info.md
NOTE: Both
Page
andPost
files require Front Matter dashes to be considered for processing. Otherwise, they're simply designated as aStaticFile
.Front Matter dashes should be at the very beginning, before your content, and simply look like this:
--- --- < your content >
Install jekyll on Linux Mint 18 with the following steps:
sudo apt install ruby
sudo apt install build-essential
sudo apt install ruby-dev
sudo gem install jekyll
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install ruby -y
gem install jekyll
Found this guide here.
$ gem install jekyll
$ jekyll new my-awesome-site
$ cd my-awesome-site
~/my-awesome-site $ jekyll serve
Now browse to http://localhost:4000
$ gem install jekyll bundler
$ jekyll new my-awesome-site
$ cd my-awesome-site
~/my-awesome-site $ bundle exec jekyll serve
Now browse to http://localhost:4000