DEV Community

Cover image for Troubled Setting Up Your Own Blog? Then Try Out What I did.
Jarmos
Jarmos

Posted on

Troubled Setting Up Your Own Blog? Then Try Out What I did.

Earlier the other day, I shared my thoughts on why Data Scientists should try their hands on blogging. You can read more on it at As A Data Scientist, What's Your Excuse to Not Blog?. It took me a while but it eventually hit me.

Stating how to do it might benefit more than blatantly stating why they should do it instead. So I decided to share this article as a "hand-held" guide to setting up one's own blog!

I used Hugo which is an extremely fast Static Site Generator & also one of the most popular ones, on par with Gatsby & Jekyll. In fact, Netlify ranks it in no.3 as the most popular SSG out there!

So Why Hugo? Here Are My Reasons:

  1. As a Data Scientist, I want to abstract my web development workflow as much as possible. This way I'm focused on delivering DS/ML stuff than actual Web Dev stuff. If you're comfortable with CLI, Hugo will be your best friend as you'll see further into the post. Trust me on that!

  2. Hugo was built on Go, which gives it an unparalleled production speed. Check out David's Performance Test on freeCodeCamp where he got whooping 8.7 seconds load speed on a 2G connection. I wondered if all I want is to deliver reading resources for my audience, it doesn't matter if I've a login system or a backend system, etc. A simple easy-to-setup, fast & static blog is all I needed.

  3. There're no additional dependencies to download onto my computer! Yes, you read it right. I didn't even have to download Golang to install Hugo. How cool is that? Simply download the required binary, install to $PATH & you're good to go.

  4. The list Hugo themes rival that of the ones available for Gatsby. Coupled with the ease of use, quick development time & modern-looking themes I couldn't find any reason to look elsewhere. Read ahead & I'll definitely suggest some themes for you to check out on your blog.

Now The Guide You've Been Eagerly Waiting For.

Downloading & installing Hugo locally is fairly straightforward. Also it's very well documented in the official Getting Started guide, so definitely check it out. Regardless, here's an overview:

That's it! You're done, well almost! But rest assured the scary part is far behind you now.

Hosting The Site

  • So create a <REPO_NAME> repository on GitHub & push your local repository up there.
  • Login to Netlify & click on "New site from Git" which should take you to the following page:

Create a New Site on Netlify

  • Click on the GitHub button & select the appropriate repo as the image below.

Select GitHub repo for Netlify to build the site from

  • Under Basic Build Settings type the Hugo command & Publish under the "Build Command" & "Publish Directory" respectively.

Deploy the site live

  • Deploy site! Change the URL to something that's more human-readable & that's it. Change the URL name to something more human-readable

You're done! Your personal blog was developed & deployed in less than an hour. If it's that easy I really wonder, As A Data Scientist,s What's Your Excuse To Not Blog?

Cover Photo by Sydney Rae on Unsplash

Top comments (0)