Skip to content

Exclude generator scripts and draft outputs from site bundles - #1052

Merged
LukasWallrich merged 3 commits into
rebrand-doorsfrom
doors-fix-bundle-exclusions
Nov 8, 2026
Merged

LukasWallrich merged 3 commits into
rebrand-doorsfrom
doors-fix-bundle-exclusions

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Hugo currently publishes generator scripts and a draft output from content bundles. Extend the existing ignoreFiles configuration to exclude .py and .mdOUT files, leaving their source locations intact.

Fixes #976.

The dedicated regression test builds the site (or accepts an existing build through FORRT_TEST_BUILD_DIR), checks that these file types are absent, and verifies that the resources/summaries/reference pages, syllabus PDF and glossary JSON remain published.

Verification

  • Full hugo --destination "$PWD/scratch-bundle-exclusions/build" --cacheDir "$PWD/scratch-bundle-exclusions/cache" build with HUGO_RESOURCEDIR set inside the same scratch directory: passed. Local Hugo 0.164.0 extended; CI pins 0.158.0, which was not run locally. Existing Hugo deprecation warnings remain.
  • python3 scripts/check_seo_html.py scratch-bundle-exclusions/build: all 11 hard checks passed; report-only findings match the baseline.
  • python3 scripts/rebrand/check_source_rules.py --base origin/main: passed after commit; no generated-path changes.
  • FORRT_TEST_BUILD_DIR="$PWD/scratch-bundle-exclusions/build" python3 -m unittest discover -s scripts/tests: 86 tests passed.
  • python3 -m unittest discover -s scripts/tests -p test_bundle_exclusions.py: both tests passed, including an independent Hugo build. Against the baseline build, the exclusion test failed on exactly the five reported files while the preservation test passed.
  • Documented python3 scripts/spell_check/check_spelling.py, using scratch-local codespell: 163 existing findings across 107 unchanged files. Direct codespell on both changed files passed. No unrelated spelling fixes included.
  • Compared complete before/after build file inventories and bytes: exactly the five paths below disappear; no additions and every retained file is byte-for-byte identical. git diff --check passed.

Comparison expectations

Claude approved explicit scripts/rebrand/allowed_changes.txt entries for these five non-page outputs. The full matched baseline/candidate comparison now passes: 4,710 reference files, 4,705 retained outputs, no unexpected URL, structured-data or SEO differences. All 46 comparison unit tests and the source-rules check pass; the added lines pass codespell. Protected #1042 remains untouched:

  • resources/resource.py
  • summaries/summaries.py
  • glossary/_create_glossaries.py
  • glossary/_build_references.py
  • replication-hub/submit/submit.mdOUT

UI decision needed

None. This change only excludes non-page source/draft files from publication; retained output is unchanged.

🤖 Generated by GPT-6.1 Sol (Codex); review and UI decisions by Claude Code


Summary by cubic

Prevents Hugo from publishing generator scripts (.py) and draft outputs (.mdOUT) from content bundles by extending ignoreFiles in config/_default/config.toml; source files stay in the repo. Fixes #976.

  • Adds the five removed output paths to scripts/rebrand/allowed_changes.txt so Doors' comparison stays clean.
  • Adds a unit test that reads ignoreFiles and verifies all .py/.mdOUT files under content/ are ignored while pages and bundle assets are not; it runs without Hugo.

Written for commit e74d3c0. Summary will update on new commits.

View guided diff Turn on auto-fix

@LukasWallrich
LukasWallrich requested a review from a team as a code owner November 8, 2026 19:20
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Image files/references in png/jpg format detected

Note that we generally rely on webp format for this webpage, so please consider converting these images to WebP format and updating references accordingly.

References to image files:

  • scripts/rebrand/allowed_changes.txt: post/*/featured_hu.jpg
  • scripts/rebrand/allowed_changes.txt: post/*/featured_hu.png
  • scripts/rebrand/allowed_changes.txt: ai-metascience/featured_hu.png

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 4 changed file(s)! 🎉

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread config/_default/config.toml Resolved
LukasWallrich and others added 2 commits November 8, 2026 19:23
…in a unit test

The test now reads ignoreFiles from config.toml and checks that every script and
draft under content/ is ignored while pages and bundle assets are not. It runs in
milliseconds and needs no Hugo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/tests/test_bundle_exclusions.py Resolved
@LukasWallrich
LukasWallrich merged commit f66a42a into rebrand-doors Nov 8, 2026
6 checks passed
@LukasWallrich
LukasWallrich deleted the doors-fix-bundle-exclusions branch November 8, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant