Changed /content/posts to /content/post, gives a 404 page and old theme I uninstalled is used. Also localhost:1313 was used instead of BaseURL in /content/posts

As title says, I did mv /content/posts /content/post .

And to uninstall terminal theme that I installed as a submodule I did

rm -rf themes/terminal/

git rm -rf themes/terminal/

here’re my config files

hugo.toml

baseURL = "https://RimGzegz.github.io/"
canonifyURLs = true
uglyURLs = false
theme = "risotto"
title = "Rim's cottage"
author = "Rim"
copyright = "© Rim"
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API.
# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456
ignoreErrors = ["error-remote-getjson"]

# Automatically add content sections to main menu
sectionPagesMenu = "main"

[pagination]
pagerSize = 3

[params]
noindex = false

[params.theme]
palette = "tokyo-night-dark"

# Sidebar: about/bio
[params.about]
title = "Rim's cottage"
description = "My personal website for blogs and tutorials."
# unicode/emoji logo:
logo = "🐱"
# or use an image:
#logo_image = "images/rice.svg"

# Sidebar: social links
# Available icon sets:
# * FontAwesome 6 <https://fontawesome.com/> ('fa-brands', 'fa-normal', or 'fa-solid' for brands)
# * Academicons <https://jpswalsh.github.io/academicons> ('ai ai-')

[[params.socialLinks]]
icon = "fa-brands fa-github"
title = "GitHub"
url = "https://github.com/RimGzegz"

#[[params.socialLinks]]
#icon = "fa-solid fa-envelope"
#title = "Email"
#url = "mailto:example@example.com"

#[[params.socialLinks]]
#icon = "ai ai-orcid"
#title = "ORCID"
#url = "https://orcid.org/0000-0001-2345-6789"


[menu]

  [[menu.main]]
    identifier = "Posts"
    name = "Posts"
    url = "/post/"
    weight = 10

[taxonomies]
category = "categories"
tag = "tags"
series = "series"

# For hugo >= 0.60.0, enable inline HTML
[markup.goldmark.renderer]
unsafe = true

[markup]

  # Table of contents
  # Add toc = true to content front matter to enable
  [markup.tableOfContents]
    startLevel = 2
    endLevel   = 3
    ordered    = true

[privacy]

  [privacy.vimeo]
    disabled = false
    simple = true

  [privacy.x]
    disabled = false
    enableDNT = true
    simple = true

  [privacy.instagram]
    disabled = false
    simple = true

  [privacy.youtube]
    disabled = false
    privacyEnhanced = true

[services]

  [services.instagram]
    disableInlineCSS = true

  [services.x]
    disableInlineCSS = true

and here’s my .github/workflows/gh-pages.yml

name: GitHub Pages

on:
  push:
    branches:
      - main  # Set a branch to deploy
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-22.04
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v3
        with:
          hugo-version: 'latest'
          # extended: true

      - name: Build
        run: hugo --minify --baseURL "https://rimgzegz.github.io/"

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/main'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public

the symptoms and site would lead to.

  • a commit public created with hugo server and with some test settings
  • a CI build that did not create pages

more checks and details may help:

  • your previous hugo version and the one from latest run.
  • add --logLevel debug to hugo call. and check your logs
  • your links point to //localhost:1313 without protocol… Canonical Urls

best would be to share your repo

after playing around, I removed [menu] and /post and baseURL suddenly started working out of nowhere, I tried adding [menu] back in to see if it broke it, but nope it didn’t break…

I am running 0.162.1 locally and latest (0.165.0) on github actions

my github repo: GitHub - RimGzegz/RimGzegz.github.io: Rim's cottage · GitHub

I am unsure if I should mark this as solved as there is no answer to what just happened…

edit: maybe me changing index.md to _index.md fixed it

for me that looks like a GitHub setup and repo / problem.

you have two active workflows.

  • committed to the repo: GitHub Pages which builds and publishes

  • pages-build-and-deployment: which publishes from your gh-pages branch

does not really make sense and can cause concurrency / change detection problems.

Recheck your GitHub pages Config “Build and Deployment” that this is set to GitHub Action.

It might be necessary to unpublish your site - correct the settings and then reactivate it.

Committed public directory

you are committing your local (hugo server) generated public folder. Don’t do that! (rare expert use case)

  • create a .gitignore file and add public/ and .hugo_build.lock
  • remove the public folder and .hugo_build.lock
  • do git add -f public .hugo_build.lock
  • commit and push that change

verify:

  • both are gone on your GitHub repo
  • only “GitHub Pages” Workflow is executed

I changed to github actions in the pages tab like shown in the image below, I even republished the website.

But now I have to manually re-run pages-build-deployment every time I push a change.

here’s log from deploy action (the one from my .github/workflows/)

Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
Run peaceiris/actions-gh-pages@v3
[INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme
Dump inputs
Setup auth token
Prepare publishing assets
Setup Git config
Create a commit
Push the commit or tag
[INFO] Action successfully completed

i’m not using the paciris action but maybe you have to read the doc ther and adjust.

or hava alook at the official deploment article: Host on GitHub Pages

with a complete workflow…

steps for interest for your simple case:

rename your deploy job to build

job build: add to matching place

  • Setup Pages
  • Upload artifact

job deploy (complete)