Manasi Salvi

Deploying my website in Jekyll

For my personal website http://manasi.me I wanted to use a Jekyll theme. I wanted to use a Jekyll theme to get the site up and running quickly and given there’s hundreds to choose from I decided to use a Jekyll theme called Contrast by Niklas Buschmann which can be found here.

I wanted to host my blog on my own custom domain rather than hosting it on the default given by GitHub Pages. Mainly because the url is shorter and sweeter and I get to personalise the domain name. The only downside being I cannot enforce https since GitHub doesn’t allow this for custom domains.

I am not too familiar with Jekyll but I had worked with Jekyll previously and I thought for a simple blog like this I can just get started and work my way through it. I looked up some Jekyll cheatsheets on Github which were quite useful in using the correct markdown syntax which can be found here and here.

I ran into a couple of issues when I decided to push the changes to GitHub and my website did not publish the way I wanted it to. The first was publishing my second blog post - there were no issues with publishing the first blog post but the second one didn’t get published. Initially I thought maybe it just takes a bit of time - wrong. I went back to my code and I didn’t see anything wrong there as I had used the correct syntax, referred to reliable sources for syntax guides. The one place I didn’t look at though was the Jekyll documentation. The issue was that I did not use the correct convention when saving the file to the _posts folder. Instead of using the correct convention 2012-09-12-how-to-write-a-blog.md I just wrote it in the format 2012-09-12.md which Jekyll did not recognise and therefore did not publish.

The second issue was getting the custom domain name working. When I changed the settings in GitHub Pages to publish the site from the custom domain it published in plain HTML. Again, the Jekyll documentation was helpful. All I had to do was modify the _config.yml file in the repository and change the url to the custom domain. Once the changes were successfully pushed to GitHub, the site published perfectly.


comments powered by Disqus