You Should Use a Remote Theme for Your Jekyll Repository
Normally, there are two ways to use a Jekyll theme.
- Specifying the Jekyll theme you use in
_config.yml
, for example,theme: minima
. The disadvantage is that you can’t do completely free customization. - Copying all needed files from the Jekyll theme into your repository. The disadvantage is that you can’t easily track the recent updates of the Jekyll theme.
However, thanks to the jekyll-remote-theme
plugin, you can use any GitHub-hosted theme. That means if you love a Jekyll theme, you can fork the repository and do your customized modification in there. Then you can use this new theme in your Jekyll site.
For example, I had forked the minima
theme and checkouted a branch alex
to do customization. For using this theme, I just need to
- Specify
gem "jekyll-remote-theme"
inGemfile
. -
Add the following to
_config.yml
.plugins: - jekyll-remote-theme remote_theme: alexhuangster/minima@alex
Now, I finished the separation of theme and contents.