How to fix 'hugo serve' not showing drafts
Problem
When running
hugo_serve_drafts.sh
hugo serve
you see all normal content but draft posts or pages are not shown at all
Solution
You need to run hugo serve
with the --buildDrafts
, or -D
flag:
example.sh
hugo serve -D
Now, refresh the page in the browser and you should see your drafts as well as your normal posts
Check out similar posts by category:
Hugo
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow