Respect build draft mode in content ID validation#235
Conversation
|
Draft modules are now only validated when the build actually renders them (hugo --buildDrafts). When draft mode is off, draft content is skipped entirely instead of being run through registry validation, so it is neither checked nor reported as a warning. Draft state is derived from Hugo's build-aware page status; the file-based draft fallback now marks such content with a neutral draft status and skips validation rather than emitting a draft warning. Drafts that are being built keep the existing soft draft_warning behaviour and never block publishing. Signed-off-by: Marcus Blom <158522975+marblom007@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request updates the content health validation logic to respect Hugo's draft mode, ensuring draft content is only validated when drafts are rendered (hugo --buildDrafts), and updates the documentation and instructor toolkit template accordingly. The reviewer identified a logical issue where the newly introduced condition and $isDraft (not $draftBuilt) is dead code, because Hugo only includes draft pages in $site.Pages when --buildDrafts is active (making $draftBuilt always true for draft pages). Consequently, the reviewer recommends removing this unreachable logic and reverting the associated template changes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Draft modules are now only validated when the build actually renders them (hugo --buildDrafts). When draft mode is off, draft content is skipped entirely instead of being run through registry validation, so it is neither checked nor reported as a warning.
Draft state is derived from Hugo's build-aware page status; the file-based draft fallback now marks such content with a neutral draft status and skips validation rather than emitting a draft warning. Drafts that are being built keep the existing soft draft_warning behaviour and never block publishing.
Notes for Reviewers
This PR fixes #
Signed commits