Skip to content

ejangi/ejangi.com

Repository files navigation

ejangi.com

This hugo website is my personal website.

Adding a new page

  1. To create a new project:
hugo new projects/<page name>

How this site was created

  1. Build and run the docker image:
docker-compose build
docker-compose run app bash
  1. From the bash prompt, create a new hugo site in the current directory:
hugo new site . --force
  1. Update the config.toml file with the settings for this website.

  2. Create a new theme:

hugo new theme <theme-name>

Good to go! Simply exit out of the container and bring the container up to start developing the site:

docker-compose up

Adding SASS

Gosh, the documentation on this is hopeless... So, here it is in a nutshell.

  1. In your theme folder, create assets/scss/main.scss.

  2. Wherever you want the uri for the compiled CSS, add the following:

{{ $sass := resources.Get "scss/main.scss"  | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }}
<link rel="stylesheet" href="{{ $sass.Permalink }}">

Updating the docker image

  1. Build and tag:
docker build -t ejangi/hugo:latest .
  1. Push to docker hub:
docker push ejangi/hugo:latest