Other cool things present in this blog site

2 minute read

When I started to build this site, I saw a lot of other cool blogging sites, and me not knowing much about web development, was just analyzing the effort which may go through to set up a website. But then I stumbled into one of my college senior’s personal portfolio website and it looked pretty and minimal. Thats when I stumbled on Jekyll, and the theme Minimal Mistakes. Gotta say it was not a breeze to set it up, but it was hell a lot easy than creating it other ways. Maybe there are easier ways, need to look at them. But this was first time I was editing HTML/CSS, writing JS and it was fun.

I have integrated my Spotify’s weekly top tracks into this blog site. It was based on Nate Moore’s implementation. Was a bit challenging and difficult than setting my own staticman instance, but gave me a lot of ideas into how we can use spotify’s api’s in other places. Instead of using the above implementation, you can create your own instance, by using spotify’s api’s and creating a basic html which you can embed to your site.

Apart from this I added a resource’s tab, the idea behind it was to collate any information which I can find in github and is useful here, with due credits to the repository. But it didn’t work out as expected, it needed a lot more effort than what I estimated.

For the comments in these blog posts, there is an avatar to each user’s comment, beside his name. I wanted to create these avatar’s like how GitHub gives all of the user’s an avatar. But GitHub has a backend and it can store and retrive an avatar as many times it want. On the other hand, in my website, I create the avatar dynamically, at runtime, by reading user’s hashed email id. So every user will have his/her own avatar, irrespective of which blog post he comments on or how many times he comments. Don’t worry, one can’t read your email id because hash functions are not reversible.

My version of avatar code is adopted from this GitHub gist, with a lot of changes. There is lot of string manipulation, radix conversion and bit manipulation, after which I endup with a 2x2 matrix of 0’s and 1’s, which acts as the final avatar for that user. Maybe I’ll add the code later to a repository, need to clean and format it.

Apart from this, other changes are just changing/editing of Jekyll theme. Not bad for a simple blog site, but can be a lot better.