How To Setup This Site

2021-12-26
3 min read

Introduction

This how-to shows the steps and tools that I used to setup this website. To do that I used Hugo to generate static content that is hosted in GitHub Pages. The template I used is called Eureka and I used Namecheap as the DNS Registrar.

I relied in a group of tutorials that can be found online. You will find a list of them at the bottom of this page.

Installing Hugo

Depending on the package manager that you use, these are the commands you need:

sudo port install hugo
brew install hugo

Setting Up The Local Repositories

This site uses two repositories: one for configuring the site and creating pages and one for the static content that is later published by GitHub Pages.

First create two repositories in github. Let’s say one is called blog and the other sxntixgo.github.io (you will need to replace this name with such that it uses <your_username>.github.io). The repository blog will be used for development and sxntixgo.github.io will contain the static content.

After both repositories have been created, clone the first one and create a hugo project:

git clone git@github.com:sxntixgo/blog.git
cd blog
hugo new site .

Now we will clone the repository sxntixgo.github.io such that it becomes a submodule of blog:

git submodule add -b main git@github.com:sxntixgo/sxntixgo.github.io.git public

Installing Eureka

To install the Hugo template Eureka, we will create clone the theme Github repository as a submodule. The local repository will be located under the folder themes:

git submodule add https://github.com/wangchucheng/hugo-eureka.git themes/eureka

Installing Eureka as a submodule allows us to easily pull any new updates in the GitHub repository.

Setting Up GitHub Pages

In a browser, go to the following URL: https://github.com/sxntixgo/sxntixgo.github.io/settings/pages (you will need to update the URL so that it follows https://github.com/sxntixgo/<your_username>.github.io/settings/pages), find the section called “Custom domain” and type the custom domain for the site. In this case, my custom domain is gimenezocano.com. Additionally, you should enforce HTTPS by checking the checkbox “Enforce HTTPS”.

Setting Up Namecheap DNS

In your Namecheap dashboard, find your domain and click on the button “Manage” and then click on “Advanced DNS”. Or go to https://ap.www.namecheap.com/Domains/DomainControlPanel/gimenezocano.com/advancedns (you might need to update the URL with the right domain). Then, in the “Hosts Records” section add the following records:

Type Host Value TTL
A @ 185.199.108.153 Automatic
A @ 185.199.109.153 Automatic
A @ 185.199.110.153 Automatic
A @ 185.199.111.153 Automatic
CNAME www sxntixgo.github.io Automatic

You will need to modify the value of the CNAME record with the URL that includes your username.

Next Steps

Probably at this point you want to start using Hugo and configuring Eureka to create the content for the site.

Resources

Avatar
Santiago Gimenez Ocano Originally from Argentina. I like to do things with computers. Senior Security Engineer. SAINTCON HC black badge.