Refs work with `hugo serve -D` but fail with only running `hugo`

$ pwd

$ tree
| |____
| |____ # about/
| |____
| |____
| |___ # blog/
|____ # content/

My content folder directory structure above ^ apologies for the difficulty denoting which are vs , tree doesn’t work that well in showing the difference, I added some comments to help

I’m on hugo version v0.68.3

$ hugo version
Hugo Static Site Generator v0.68.3/extended darwin/amd64 BuildDate: unknown

These refs fails in content/ when running hugo

{{< ref "/about/_index" >}}
{{< ref "/blog/design-hints" >}}
$ hugo
Building sites … ERROR 2020/06/13 11:38:46 [en] REF_NOT_FOUND: Ref "/about/_index": "joebb_website_hugo/content/": page not found
ERROR 2020/06/13 11:38:46 [en] REF_NOT_FOUND: Ref "/blog/design-hints": "joebb_website_hugo/content/": page not found
Total in 20 ms
Error: Error building site: logged 2 error(s)

But doing hugo serve -D works fine

$ hugo serve -D

                   | EN
  Pages            | 26
  Paginator pages  |  0
  Non-page files   |  0
  Static files     |  2
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Built in 31 ms
Watching for changes in joebb_website_hugo/{archetypes,content,data,i18n,layouts,static}
Watching for config changes in joebb_website_hugo/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address
Press Ctrl+C to stop

I’m on macOS and I installed hugo using homebrew if that helps at all

Here be my repository:

-D, --buildDrafts            include content marked as draft

if you need access to the draft content then you need to use hugo -D

also check hugo --help for complete options/flags


that makes sense, sorry I didn’t pick up on that. Thanks so much!

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