Start Developing with Jekyll on Windows
Today, I launched my personal website thanks to the awesome theme prepared by alshedivat. Although I have dual boot on my computer I have been using Windows Subsystem for Linux (WSL) for a while now and I had some troubles setting up jekyll on my laptop so in this quick post I will try to explain the steps I followed to make this website working.
-
You should set up git in WSL if you haven’t done so far. I recommend this post. It allows you to share SSH keys between Windows and WSL.
-
If you don’t have ruby installed on WSL, run the following commands:
Now, you are ready to develop your jekyll site.
-
Download or fork the original repository. Change its name to
your_username.github.io
. -
Execute following command which will set up the necessary gems (gems are code that package specific functionality [1]):
Then, start seeing your changes in the browser at the local server address specified by the output of the following command:
When you are finished, commit and push your changes, exit from applications that are accessing the repository (eg. kill jekyll server, exit from VSCode, etc.) and execute ./bin/deploy
which will compile your files to gh-pages
branch and push them to the remote repository. The theme repository specifies that it is better to run /bin/deploy --user
for personal sites which will copy your files to source branch and compile html files to master branch. Either way make sure to specify which source github-pages will use in the settings of your repository!
Disabling certain features in the beginning:
- To remove pageX from the navbar simply change the
nav: true
tonav: false
in_pages/pageX.md
. - To add pageX to navbar do the opposite and create _pageX folder.
- To disable blog feature comment out the following part in
_includes/header.html
Some cool features
- You can change the theme-color in
_sass/_variables.scss
.
Enjoy Reading This Article?
Here are some more articles you might like to read next: