https://jekyllrb.com/docs/step-by-step/01-setup/
Welcome to Jekyll’s step-by-step tutorial. The goal of this tutorial is to take you from having some front end web development experience to building your first Jekyll site from scratch — not relying on the default gem-based theme. Let’s get into it!
Jekyll is a Ruby program so you need to install Ruby on your machine to begin with. Head over to the install guide and follow the instructions for your operating system.
With Ruby setup you can install Jekyll by running the following in your terminal:
gem install jekyll bundler
To create a new Gemfile
to list your project’s dependencies run:
bundle init
Now edit the Gemfile
and add jekyll as a dependency:
gem "jekyll"
Finally run bundle
to install jekyll for your project.
You can now prefix all jekyll commands listed in this tutorial with bundle exec
to make sure you use the jekyll version defined in your Gemfile
.
It’s time to create a site! Create a new directory for your site, you can name it whatever you’d like. Through the rest of this tutorial we’ll refer to this directory as “root”.
If you’re feeling adventurous, you can also initialize a Git repository here. One of the great things about Jekyll is there’s no database. All content and site structure are files which a Git repository can version. Using a repository is completely optional but it’s a great habit to get into. You can learn more about using Git by reading through the Git Handbook.
Let’s add your first file. Create index.html
in the root with the following content: