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

**URL:** <https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528>\
**Category:** support\
**Created:** [April 25, 2021, 5:29pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528 "2021-04-25T17:29:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tylerlrhodes](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tylerlrhodes/32/5716_2.png) [@tylerlrhodes](https://discourse.gohugo.io/u/tylerlrhodes)\
**Post date:** [April 25, 2021, 5:29pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528/1 "2021-04-25T17:29:09Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![jgreely](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jgreely/32/6796_2.png) [@jgreely](https://discourse.gohugo.io/u/jgreely)\
**Post date:** [April 25, 2021, 6:03pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528/2 "2021-04-25T18:03:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tylerlrhodes](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tylerlrhodes/32/5716_2.png) [@tylerlrhodes](https://discourse.gohugo.io/u/tylerlrhodes)\
**Post date:** [April 25, 2021, 6:31pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528/3 "2021-04-25T18:31:57Z")

</div>

Sure. I’m running on a Mac:

Repo is at: [GitHub - tylerlrhodes/blog2: updated blog](https://github.com/tylerlrhodes/blog2)

```auto
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

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [April 25, 2021, 6:54pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528/4 "2021-04-25T18:54:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tylerlrhodes](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tylerlrhodes/32/5716_2.png) [@tylerlrhodes](https://discourse.gohugo.io/u/tylerlrhodes)\
**Post date:** [April 25, 2021, 6:58pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528/5 "2021-04-25T18:58:10Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 27, 2021, 6:59pm UTC](https://discourse.gohugo.io/t/hugo-doesnt-build-files-unless-d-included-however-many-are-set-to-draft-false/32528/6 "2021-04-27T18:59:09Z")

</div>

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