Hugo vs Hugo -D

Well, it seems I just learned the difference between using “hugo” and “hugo -D” when generating my content posts.

As the documentation clearly indicates:


-D, --buildDrafts            include content marked as draft

While - of course - without the “-D” option whatever is set as a “draft” will not create a file !

It is silly and I feel kind of “dahhh, it was obvious Alex…”, but to be honest, all this time I used “hugo -D”.

So, why is it important?

Well, everything was working, my posts are there and everything looks fine, but today I realized that I wanted to write something while knowing that I won’t finish it the same day, so I needed a “draft”…! But, I did not want to create the draft in a completely different location in my workstation, I wanted it in the same hugo repo where I have my current posts.

This simple finding has simplified my workflow a bit and that is the reason it deserves a TIL entry. :)

 Share!

 
comments powered by Disqus