Hugo doesn't build files unless -D included, however many are set to draft:false

After an upgrade to Hugo 0.81, when I perform “hugo” from the command line or attempt to serve the site without drafts it doesn’t work.

If I include -D in the options all of the sites content comes up correctly, including drafts. However, most of the content is not a draft, and now isn’t served at all if I don’t use -D

Has there been a change recently or some simple setting I could have run into that would cause this?

Thank you!

This is one of those cases where a link to your repo is all but essential to diagnosing the problem, but you could start by including the output of hugo and hugo -D to show how the page counts differ.

-j

Sure. I’m running on a Mac:

Repo is at: GitHub - tylerlrhodes/blog2: updated blog

Tylers-MacBook-Pro:blog2 tylerrhodes$ hugo
Start building sites … 

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

Total in 76 ms
Tylers-MacBook-Pro:blog2 tylerrhodes$ 


Tylers-MacBook-Pro:blog2 tylerrhodes$ hugo -D
Start building sites … 
WARN 2021/04/25 14:29:22 Page.RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
    {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}

                   | EN   
-------------------+------
  Pages            | 198  
  Paginator pages  |   0  
  Non-page files   |   0  
  Static files     |  12  
  Processed images |   0  
  Aliases          |   0  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 182 ms
Tylers-MacBook-Pro:blog2 tylerrhodes$ 

Thank you for any help!

-Tyler

The top level content/_index.md is a draft, try setting it to false.

2 Likes

Yep looks like that was it. I guess the older version that I was on treated it differently before and I totally missed it here.

Thank you for your help!

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