Setup: Tinker With The Template
If youβre here, I presume you have already setup git
, jekyll
, ruby
, and the underlying technologies required to get a jekyll
project up and running.
0 Gem or Fork? π
There are a couple of ways you can use the jekyll-garden
template:
Way | Why? |
---|---|
π Import the gem. | This is ideal if you simply want to play around with config, data, and selectively override anything you want to change. If you use the gem, installing and updating jekyll-garden templateβs new features or bug fixes is as easy as changing one line in your project. |
π΄ Fork the template project. | This exposes you directly to the code (namely the styles and layouts), which allows you to tinker with the html, css, javascript, or even ruby directly. This is useful if you want to customize the template heavily and donβt mind missing out on bug fixes or feature updates. |
A. Fork π
Head to the jekyll-garden
repo and fork the project by clicking the βForkβ button in the upper-right.
Then head back to the clone instructionsβ¦
B. Gem π
B1 Start A New Project π
Start a new jekyll
project:
$ jekyll new my-bonsai
B2 Add Imports π
Add webrick
to your Gemfile
:
gem "webrick"
Next, add jekyll-garden
:
gem "jekyll-garden"
Set the theme in _config.yml
:
theme: jekyll-garden
B3 Add Necessary Files π
- Add these directories to your project:
_states/
_entries/
- Add some markdown documents:
- Add some states: state
- Add at least a
root.md
entry: entry doctype.
- In
_config.yml
:- Add minimum configurations for collections: document > config
- Add minimum configurations for frontmatter: frontmatter > config
- An
index.md
is required, but should have been automatically generated byjekyll new
.
Back To Setup π
And head back to the run instructionsβ¦