It’s possible to indicate an entire topic/chunk of content as draft with draft:true in the frontmatter. However, I’m looking for a more fine-grained way to do this. Effectively a conditional tag in the markdown to say “this paragraph is a draft, don’t include it”, while letting the rest of the content be included as normal.
Is this something shortcodes would be good for? I had a brief look, and most shortcode examples seem to be just for styling, not for hooking into Hugo itself.
it would be great to have a way to replicate the conditional tag functionality provided by something like MadCap Flare.
Just to add, if using Org mode, this is supported natively using many ways:
- Wrapping the not-to-be-published content in
- Tagging such sections with
- Using uppercase
COMMENT prefix to the headings of such sections.
- Or, using the Org mode
# comment prefix at the beginning of lines to be ignored.
Thanks - looking at the docs, org mode seems to only be for people using Emacs, is that correct?
It’s sort of correct. I use Emacs. But I collaborate regularly with folks using Org mode on Vim. There’s even a popular Org mode package for VS Code.
I am trying to make* Org mode accessible to non-Emacs users too as it has a really awesome powerful syntax.
*: For instance, I have this
Makefile. The user needs to have Emacs installed on their system. But then by simply editing the Org mode files (they are plain text like Markdown) using any editor they like, they just need to do
make doc to export the Org mode docs and publish that Hugo site.