Different number of pages generated for hugo build vs server


#1

Trying to figure out why hugo and hugo server -D generates different number of pages. I saw this issue come up when deploying to Netlify (from Github) and certain pages were returning 404 (/about, /posts). Thoughts?

I’m using the terminal template as well (slightly modified, forked version). Thanks!

$ hugo

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

Total in 29 ms

$ hugo server -D

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

Total in 10 ms

#2

This builds draft content. Running only hugo does not.

Edited to add docs link: https://gohugo.io/getting-started/usage/