Getting started

In this directory, run docker compose up if you have Docker installed.

Hugo CLI

If you don’t have Docker installed or prefer to use the CLI, use brew install hugo or follow these instructions.

Folders

  • .github/workflows is a hidden folder for building your site on GitHub and deploying it to a GitHub pages instance
  • archetypes
  • assets is for any files such as stylesheets and scripts that need to go through Hugo’s asset pipeline. These assets are processed by Hugo whereas files in static are not
  • content is where all your content goes
  • layouts are where your templates go. Hugo combines your content with layouts to create your website
  • public and resources are generated by Hugo and you don’t need to touch them
  • static is for all static assets which can stand alone, such as fonts.

Custom Domain

Let’s say you are adding yourdomain.com to your website. In addition to DNS updates, you have to do the following below:

  • Update config.yaml by modifying baseURL to your custom domain
baseURL: http://yourdomain.com/
  • Edit .github/workflows/hugo.yml by uncommenting the cname and adding your custom domain:
- name: Deploy
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./public
        cname: yourdomain.com