I'm trying to install Github Pages' Slate theme on my CentOS 7 VM so I can locally preview my new site using the bundle exec jekyll serve
command.
I followed the instructions as best as I could.
- I changed the theme
minima
tojekyll-theme-slate
in my_config.yml
file. - Then I changed
gem "minima", "~> 2.0"
togem "github-pages", group: :jekyll_plugins
in myGemfile
file.
After that (since these are their only instructions), I ran bundle exec jekyll serve
and it told me I had gems that weren't installed (duh), and suggested running bundle install
.
- I ran
bundle install
, which told me there was a conflict in version types of the dependencies and it suggested thatbundle update
could potentially resolve that issue. - No problem, I ran
bundle update
. A few plugins/features actually reverted versions here, but I got the Slate theme installed on my machine now, version0.0.4
for whatever reason.
After that, I ran bundle exec jekyll serve
again. I got this error:
Configuration file: /home/peri/my-site/_config.yml
Configuration file: /home/peri/my-site/_config.yml
jekyll 3.4.3 | Error: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
In a way, that error makes sense. For a custom theme to work, I probably need a tool to run their custom scripts. But first, I noticed this extra section in the theme's installation instructions, which directly mentions being able to locally preview the site with that theme.
- I downloaded the source, instead of cloning it...I don't need the
.git
stuff do I? - I edited the
script/bootstrap
file because/usr/local
requires root and usingsudo
doesn't know about any binary calledgem
orbundle
. I changedgem
andbundle
to their respective absolute paths and ransudo ./script/bootstrap
inside ofslate-master
.
Point of the story is, it didn't work for my home/peri/my-site
directory when I ran bundle exec jekyll serve
. Presumably, it's because they intended for the user's site to be integrated into their theme's source code? That doesn't seem intuitive or correct. So, I investigated ExecJS.
- I installed it.
gem install execjs
- I added
gem "execjs", "2.7.0"
to myGemfile
file.
Got the same error as before.
How am I supposed to install this Jekyll theme?