Blog

Show Your Work

Our blog is a few steps away from being ready to see the world1.

  1. Configure the site

    diff --git a/site/hugo.toml b/site/hugo.toml
    index 4dba0ec..7d59855 100644
    --- a/site/hugo.toml
    +++ b/site/hugo.toml
    @@ -1,6 +1,6 @@
    -baseURL = 'https://example.org/'
    +baseURL = 'https://imomaliev.com/'
     languageCode = 'en-us'
    -title = 'My New Hugo Site'
    +title = 'Blog'
    
     [module]
       replacements = 'github.com/imomaliev/blog/theme -> ../../theme'
    
  2. Follow all the steps in the Host on GitHub Pages guide.

  3. Update workflow to build in and publish from site directory.

    diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml
    index 20e1d20..d8cc26d 100644
    --- a/.github/workflows/hugo.yaml
    +++ b/.github/workflows/hugo.yaml
    @@ -74,6 +74,7 @@ jobs:
                 hugo-
           - name: Build the site
             run: |
    +          cd site/
               hugo \
                 --gc \
                 --minify \
    @@ -88,7 +89,7 @@ jobs:
           - name: Upload artifact
             uses: actions/upload-pages-artifact@v4
             with:
    -          path: ./public
    +          path: ./site/public
       deploy:
         environment:
           name: github-pages
    
  4. Configure a custom domain apex domain.

    We are going to publish our site via GitHub Actions, so we can skip setting CNAME in step 4. And on step 5 we will set AAAA records.

  5. Verify the domain with GitHub.

  6. And we are live!


  1. Title is inspired by the book of the same name ↩︎

Tags: