Experimenting with Hugo
Jan 16, 2016
2 minutes read

Experimenting with Hugo

This is my first post and I'm going to talk about how I created the site. Last time I decided to create anything like a blog it was 1999. I'm used to work with dynamic webpages with database access upon request, since 1999 websites development has changed from static files only to dynamic webpages and now it's coming back to static file again, to improve user experience by being as fast as it can possibly be. The difference from 1999's website development, now a days we have tools to dynamically create static files and that's what Hugo does. There are many other tools like Hugo, a popular choice is Jekyllrb, I choose Hugo because it seemed simple and fast enough.

In case you want to see the original files I'm currently using for this experiment, I created a Github repository.

QuickStart

Hugo has a good documentation, in the quickstart section you can create a website under 2 minutes.

If you watch this video will know the basics to get started.

Themes and layouts files

After the quickstart, I knew how to create site, add content and create site files, just needed to find a theme I like and start writing content. I wanted something clean and simple, so after looking at most of themes in Theme Showcase I found Cocoa developed by Nishanth Shanmugham. To install it I just clone the repository into themes directory in the project root directory. It looks something like this:

cd project-root-dir
git clone https://github.com/nishanths/cocoa-hugo-theme.git themes/cocoa

Even though the theme is good, I still wanted to make some changes without touching the original source, so I added some new files into layouts folder which is used instead of the ones in the theme.

Github Pages

I publish the site using Github, I just created a new repo called vhugo.github.io and push all files from my Hugo project's public folder. if you want to know more about this check Github Pages.

Editors for code and markdown content

As a developer I love text editors of all kind, but don't like fancy IDEs as much. For years I used TextMate and when SublimeText showed up and I felt the need to switch editors, been using it ever since. There's a new editor emerging from the GitHub team called Atom, still miss a lot of packages that I'm used to on SublimeText, but it looks promising. SublimeText has some packages to help edit markdown, but I found a MarkDown editor called Writed, loved it.


Back to posts