0. Website (this one)
Prologue
I really love coding. Coding is both my profession and my hobby, but unfortunately, I haven’t found time to commit to any interesting hobby projects as of late. My excuse is usually that I don’t have time, or that the project becomes to large and messy. Also, despite having done a ton of projects, none of them are really easy to showcase.
To fix all of these issues, I’ll try a new approach:
“I have to complete and document at least 1 coding project each month”.
This way, I must start and finish a project, and then figure out the size of it, depending on how much time I have available. In reality there is never a good moment to start a project - so just do it.
Setting up a Jekyll website
Enough rambling - now to the fun part!
To kick this off, it makes a ton of sense to start by creating a website to document all the monthly projects. I wanted to create a blog-like website, where each project would be covered in one post. So far, the easiest way for me to host a website, has been to do it through GitHub Pages. GitHub let’s you host a Jekyll website completely for free. Jekyll sites are easy to set up, and don’t require any database connections. This also means that all the content (source files and blog post content) is all gathered in a single repository, which works fine for me.
To get started, I followed this guide on setting up Jekyll (and Ruby, which it runs on). The highlights consist of:
- Installing Ruby and other prerequisites for Ubuntu
sudo apt-get install ruby-full build-essential zlib1g-dev
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
- Install Jekyll
gem install jekyll bundler
- Create the Jekyll folder structure
jekyll new . --force
- Launching the server locally
bundle exec jekyll serve
Adjusting the Theme
So, the default minima
theme didn’t resonate with me. Luckily, Jekyll let’s one install new official themes easily by adding the theme: <THEME_NAME>
to the _config.yml
file, adding gem <THEME_NAME>
to the Gemfile
, and then update the bundle using:
bundle update
Unfortunately, the I preferred, somehow was not compatible with Jekyll v4, which is required for it to run on GitHub pages. Therefore I had to implement it manually from the theme’s source code, which itself is a fork of the original hacker theme. It was surprisingly easy to get to work, so it was definitely worth the detour. From this point, it was straight-forward to implement small tweaks such as scrollbar color, fixed header, month emojis, etc.
I will admit that it required some more knowledge of the Jekyll structure to get right - so I had to go through the official step-by-step tutorial at that point. But as you can see, the website ended up quite nice - if I may say so myself.