Blogs

Access Hugo Dev Server From Any Device On The Same Network

So while developing themes or testing different layouts we might need to test the website on multiple devices and different form-factors. Running command Hugo server by default is not accessible over the network on different devices like your smartphone or tablet. In order to access the website from other devices we need to bind the server to its network interface IP (instead of the loopback IP i.e. 127.0.0.1) using the –bind argument.

Published On: Jun 18, 2019

How to compile Go program binary to run on your Linux box or Linode Server

How to compile Go program binary for running on your Linode Server I use Linode VPS for running my experiments and hosting websites. My primary development machine is Windows 10 and very frequently I need to cross-compile go program binaries to Linux OS that is the primary OS on Linode servers. Instead of doing a google search each time I need to do the cross-compilation, I thought to document the steps here so that I can refer it whenever I need.

Published On: Jun 6, 2019

How to Use Google Sheet to Store Visitor Count for Your Static Website

P.S. This post assumes that the reader is aware of Google Spreadsheets, integration with Google App Scripts, how to publish a Google Script as Web App and has somewhat familiarity with JavaScript. If not then please google for these, there are tons of good quality posts that walks you through these features in detail. Recently while working on a static site (of course generated using Hugo), I needed to add Visitor Count information on it.

Published On: Jan 3, 2019

How to Configure Hugo Site With Github Pages for Custom Domain

Hosting a static site on Github is pretty easy but there are some obscure configurations needed to get everything setup properly. This post walks through few of those for setting up hugo generated site with Github. Hugo’s official documentation on how to Host on GitHub has almost all the details that is required to configure Hugo and successfully host your static website on GitHub Pages. I got lost in the custom domain step on which the page does not have much details, except setting up the CNAME file.

Published On: Dec 24, 2018

How to Write Custom ESLint Rules for Your Project

While researching for a better (I was using JSHint before) and customizable JavaScript Code linting tool, I found ESLint and ever since have never looked back. ESList is modern, fast, customizable and cross-platform Node.js based static code analyser that looks for bad and problematic patterns in your JavaScript code. Things that I love about ESLint tool: Blazing fast scanning provides immediate feedback Ability to add custom rules this is a huge win if you use a framework that is custom or is heavily customized.

Published On: Dec 22, 2018

Golang: Print ASCII Art on Console

Ascii Arts are always fun. Few days back I finished writing a small utility that automates the code generation for the Frontend in my project. It is a command line tool and is meant to be executed on the console (command prompt as its called on Windows). I wanted to print a nice Ascii art whenever it runs. I did some research online and found two options. Either use one of the open source libraries that provides many more option for generating dynamic Ascii art Or write something by my own (quick and dirty) I came up with a simple solution that should be obvious for most developers.

Published On: Nov 27, 2018