Exclude generator scripts and draft outputs from site bundles
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 withHUGO_RESOURCEDIRset 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 --checkpassed.
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.pysummaries/summaries.pyglossary/_create_glossaries.pyglossary/_build_references.pyreplication-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.txtso Doors' comparison stays clean. - Adds a unit test that reads
ignoreFilesand verifies all.py/.mdOUTfiles undercontent/are ignored while pages and bundle assets are not; it runs without Hugo.