Yannick Lehnhausen / My First Post - Setting up Hugo
Created 2019-05-10 Modifyd 2019-05-10

217 Words

Step 1. Installing Hugo with pacman

For my main development computer I am using Antergos. To install Hugo you can simply run

sudo pacman -S hugo

Step 2. Creating the page

How to create the page? Simply run

 hugo new site quickstart 

This will set up the folder structure for Hugo inside a folder called ‘quickstart’.

Step 3. Themeing

For my page I am using the Hugo theme called ‘Basics’. You can find it here. To add the theme to your page run

cd quickstart
git submodule add https://github.com/arjunkrishnababu96/basics.git themes/basics

and add

baseURL = ""
languageCode = "en-us"
title = "Basics Theme Demo"
theme = "basics"

[params]
    author = "Author Name"

for basic configuration

Step 4. Create content

Create your first post by running

hugo new posts/my-first-post.md

This will create a markdown file in the subfolder ‘content/posts’

Step 5. Running the Hugo Server

To ‘parse’ the markdown and create the page run

hugo serve -D

This will serve your page on localhost:1313

Step 6. Hosting the page

Since I am using a ‘third party’ webhoster I can’t rely on the possibilities of Hugo to update the page. Currently I am copying the static content created by running

hugo

per hand which I dislike quite a lot. Next up I amtrying to automate this process probably with ‘rsync’.