THE GITHTML FIELD GUIDE
Check which Hugo drafts and future pages enter a build
Check Hugo's content metadata and build flags to determine whether draft or future-dated pages are included. Compare a normal production build with a deliberate review build using harmless fixtures. A page visible in the development server is not proof it will publish, and a page excluded today should not be treated as a safe place for confidential information.
Define the editorial state and expected output
Identify whether a page is a draft, scheduled future content, expired material, or ordinary published content. Record the intended state before changing metadata. Check the installed version's documented build controls and any project configuration that overrides defaults. Do not assume the development command and production command use the same inclusion rules. A future date may be intended for editorial scheduling, but the actual publication model depends on when builds run and what configuration they use. Keep that operational detail explicit instead of implying the generator automatically publishes at a particular time without a build.
Compare two clearly labeled local artifacts
Create harmless fixture pages with distinctive titles and the metadata states you need to test. Build normally into one project-specific output directory, then build a review variant with the relevant inclusion flags into another. The example deliberately includes drafts and future content for review; it is not a publication command. Inspect the output page list and confirm that the fixtures appear only where expected. Avoid using a real confidential draft as the test. Check inherited configuration and content cascades where the project uses them, since the final metadata may come from more than the individual file.
hugo --destination public-normal-review
hugo --buildDrafts --buildFuture --destination public-inclusive-reviewVerify collections and links as well as page files
Look at generated indexes, taxonomy pages, feeds, and navigation that may reference included content. A page's absence from one list does not prove the file is absent, and an included draft can enter several generated surfaces. Keep the review artifact clearly labeled so it is not mistaken for the production artifact during handoff. If a draft was previously published, excluding it from a new build does not establish removal from every earlier copy or cache. Document the expected normal-build behavior and retest after configuration changes. Editorial visibility controls are useful for publication planning but should remain separate from confidentiality and authorization decisions. Record the build's date context when testing future content. A fixture that was safely future-dated during one review can become ordinary published content later and invalidate an unchanged test assumption.
- Record each content state's intended behavior and the exact production build command.
- Use harmless fixtures to compare normal and inclusive review builds.
- Inspect files and generated collections, not only sidebar visibility.
- Label review output clearly and never assume draft metadata provides access control.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.