Build Output Is Indeterministic

What Hugo shows running as a server and what it builds into the public directory are sometimes different, that is, Hugo’s build is indeterministic.

See this video for a demonstration.

Since it sometimes does exactly what I want, and sometimes does not, I do not think it has to do with any configuration; but, below is my config.toml anyway.

baseURL      = ""
languageCode = "en"
title        = "XPhyro's Blog"
theme        = "hello-friend-ng"
PygmentsCodeFences = true
PygmentsStyle = "monokai"
paginate  = 100
rssLimit  = 100  
copyright = "This work is licensed under CC BY-NC-SA 4.0." 
archetypeDir = "archetypes"
contentDir   = "content"
dataDir      = "data"
layoutDir    = "layouts"
publishDir   = "public"
canonifyURLs = true
enableRobotsTXT = true
enableGitInfo   = false
enableEmoji     = true
enableMissingTranslationPlaceholders = false
disableRSS     = false
disableSitemap = false
disable404     = false
disableHugoGeneratorInject = false
  posts = "/posts/:year/:month/:day/:filename"
  name = "Berke Kocaoğlu"
  hrefTargetBlank = true
  posts    = "posts"
  tag      = "tags"
  category = "categories"
  series   = "series"
  dateform        = "Jan 2, 2006"
  dateformShort   = "Jan 2"
  dateformNum     = "2006-01-02"
  dateformNumTime = "2006-01-02 15:04"
  description = ""
  keywords = ""
  images = [""]
  homeSubtitle = ""
  contentTypeName = "content/posts"
  disableReadOtherPosts = false
  enableThemeToggle = true
  defaultTheme = "dark"
  enableSharingButtons = false
  customCSS = ["/style.css"]
  customJS  = []
    trademark = true
    rss = true
    copyright = true
    author = true
    topText = []
    bottomText = [
    mask = "#1b1c1d"
    msapplication = "#1b1c1d"
    theme = "#1b1c1d"
    logoMark     = ">"
    logoText     = "XPhyro's Blog"
    logoHomeLink = "/"
    logoCursorDisabled = true
    name = "email"
    url = ""
    name = "github"
    url = ""
    subtitle  = ""
    weight    = 1
    copyright = '<a href="" target="_blank" rel="noopener">CC BY-NC-SA 4.0</a> & <a href="" target="_blank" rel="noopener">MIT</a>'
    identifier = "posts"
    name       = "Posts"
    url        = "/posts"
    weight     = 20
    identifier = "tags"
    name       = "Tags"
    url        = "/tags"
    weight     = 30
    identifier = "categories"
    name       = "Categories"
    url        = "/categories"
    weight     = 40
    identifier = "series"
    name       = "Series"
    url        = "/series"
    weight     = 50
    identifier = "about"
    name       = "About"
    url        = "/about"
    weight     = 200
    startLevel = 1

There are two different states of the index.html and index.xml files in the video. One of these contains the posts, the other one does not. In the local server deployed via hugo server, index.html always contains the posts, supporting my hypothesis that this is not a configuration issue.

If you navigate to, you will see that there are no posts. But, you can reach the post that was supposed to be there via navigating to You can also reach this post from the tags, categories or series menus. On top of this, Hugo sometimes (about half of the time) correctly builds the site and shows that post there.

I believe this is not an issue related to themes. I also tested with the Ananke theme, which is the endorsed theme in the quick start guide, and the behaviour is the same.

Both version 0.85.0-1 on the Arch Linux repository and the manual build as of the commit 022c4795510306e08a4aba31504ca382d41c7fac yield the aforementioned results.

Below are the outputs of hugo version and uname -a

hugo v0.85.0+extended linux/amd64 BuildDate=unknown
Linux archlinux 5.10.49-1-lts #1 SMP Sun, 11 Jul 2021 12:21:22 +0000 x86_64 GNU/Linux

Is this a bug on Hugo’s end, or a problem with my configuration? Should I submit a bug report on GitHub?

impossible for me to say without seeing the actual site, but based on my wast experience, my best guess is that you have several resources with the same target on disk. What you see is parallelism in play. You can debug this with the --path-warnings flag.

1 Like

Indeed, the problem was as you described. Removing

  posts = "posts"

got rid of the warnings.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.