What Am Working On Now

Write a program to solve a classic ancient Chinese puzzle: We count 35 heads and 94 legs among the chickens and rabbits in a farm. How many rabbits and how many chickens do we have?

Hint: Use for loop to iterate all possible solutions.

Install Arch LinuxARM On RaspberryPi

The Raspberry Pi is an ARM v6 architecture mini computer that gained alot of fame when it was released in 2012. Formating the SD Card Start fdisk to partition the SD Card. Then type the following: o - Delete any partitions on the SD Card. p - List all partitions, at this point there should be none left. n then p for primary, 1 for the first partition, press ENTER to accept the default first sector, then type +100M for the last sector. [Read More]

Creating a New Theme

Introduction This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme. We’ll start with creating a new site with a very basic template. [Read More]

(Hu)go Template Primer

Hugo uses the excellent go html/template library for its template engine. It is an extremely lightweight engine that provides a very small amount of logic. In our experience that it is just the right amount of logic to be able to create a good static website. If you have used other template systems from different languages or frameworks you will find a lot of similarities in go templates. This document is a brief primer on using go templates. [Read More]

Migrate to Hugo from Jekyll

Move static content to static

Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. With Jekyll, something that looked like

▾ <root>/
    ▾ images/
[Read More]