Determine if building in Draft Mode (in a shortcode)?

Is there a way to determine if a site is being built in draft mode? (in a shortcode/template)

I know about .Page.Draft - but that checks that the page has its draft bit set.

What I’d like to do is on a page that is not a draft (draft=false) say whether or not things are being built in draft mode (e.g., that the draft pages are available).

Something that I could put in an if.

Thank you!

you are looking for

site.BuildDrafts works for both usages command line and config

1 Like

Thank you! This is exactly what I was looking for!

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