Skip to content

Respect build draft mode in content ID validation#235

Merged
aabidsofi19 merged 1 commit into
masterfrom
validation
Jul 15, 2026
Merged

Respect build draft mode in content ID validation#235
aabidsofi19 merged 1 commit into
masterfrom
validation

Conversation

@aabidsofi19

Copy link
Copy Markdown
Collaborator

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

  • Yes, I signed my commits.

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2026-07-15 16:09 UTC

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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread layouts/partials/academy-validation/collect-content-health.html
Comment thread layouts/partials/academy-validation/collect-content-health.html
Comment thread layouts/shortcodes/instructor-toolkit.html
@aabidsofi19
aabidsofi19 merged commit 319bf28 into master Jul 15, 2026
3 checks passed
@aabidsofi19
aabidsofi19 deleted the validation branch July 15, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants