issues/completed/8-028-clean-output-directory.md
Issue 8-028: Clean Output Directory of Test/Demo Files
Current Behavior
The output/ directory contains files that were manually created during development and testing, rather than being generated by the pipeline. This violates the principle that output/ should be clearable and fully regenerable.
Files That Should Not Be Present:
corner-box-demo.html(20KB)
- Demo file created for Issue 8-007 testing
- Contains inline CSS:
style="text-align: left; display: inline-block;" - Not generated by any pipeline script
test_similar_1001.html(12MB)
- Test file created during interactive mode testing
- Contains stale CSS from before Issue 8-003 fixes
- Generated by manual test option, not automated pipeline
archive/directory (~6MB)
- Contains
generated-site/- old site structure - Contains
test-outputs/- various test HTML files - Contains
output5.pdf- unrelated PDF file - Historical artifacts, not part of current generation
test/directory
- Contains
similar/anddifferent/test subdirectories - Created during development testing
- Duplicates structure of production directories
Additional Issue: Stale Generated Files
Files in similar/ and different/ were generated before Issue 8-003 CSS removal:
similar/001.htmlcontains 255style=attributessimilar/001.htmlcontains 1<style>block- These need regeneration after cleanup
Intended Behavior
The output/ directory should contain ONLY files generated by the pipeline:
index.html- main chronological indexchronological.html- all poems by datechronological.txt- plain text exportexplore.html- discovery instructionsnumeric-index.html- numeric search indexsimilar/- similarity-sorted poem pages (generated)different/- diversity-sorted poem pages (generated)centroid/- mood-based entry points (generated)
All test/demo files should live in a separate location or be cleaned up after use.
Implementation Steps
Step 1: Remove test/demo files from output directory ✅ COMPLETED
- [x] Remove
corner-box-demo.html - [x] Remove
test_similar_1001.html - [x] Remove
archive/directory - [x] Remove
test/directory
Result: Output directory reduced from 241MB/78 files to 165MB/25 files.
Step 2: Verify cleanup ✅ COMPLETED
- [x] Confirm only pipeline-generated files remain
- [x] Document remaining file structure
Remaining structure:
output/
├── centroid/ # 11 mood-based entry pages
├── chronological.html # 12.1 MB, all poems by date
├── different/ # 4 diversity-sorted pages (stale)
├── explore.html # Discovery instructions
├── index.html # Copy of chronological.html
├── numeric-index.html # 288 KB numeric index
└── similar/ # 6 similarity-sorted pages (stale)
Step 3: Create validation test page ✅ COMPLETED
- [x] Generate a fresh test page using current pipeline
- [x] Verify zero
style=attributes - [x] Verify zero
<style>blocks in template - [x] Verify pure HTML structure (no CSS, no JavaScript in template)
Validation results:
- Regenerated
chronological.htmlwith 7,797 poems - 0
style=attributes in HTML template - 0
<style>blocks in HTML template (1 match is poem content, not template) - 0
<script>tags in HTML template (1 match is poem content, not template) - Template uses only:
<center>,<pre>,<font color="">,<b>,<a href="">
Note: Poem content may contain <style> or <script> as literal text (e.g., someone
posted Vim's :TOhtml output as a poem). These are inside <pre> blocks and render as
text, not executed HTML. This is acceptable.
Step 4: Update .gitignore if needed
- [x] Test files removed; no pattern needed as they shouldn't be recreated
- [x] Document that test files should be cleaned before commits (noted in issue)
Quality Assurance Criteria
- [x]
ls output/shows only pipeline-generated files - [x]
grep -c "style=" output/chronological.htmlreturns 0 (template has no inline CSS) - [x] No
<style>blocks in HTML headers (only in poem content) - [x]
output/can be safely deleted and fully regenerated byrun.sh
Related Issues
- Issue 8-003: Remove remaining CSS from HTML generation (COMPLETED)
- Issue 8-007: Box-drawing borders demo (demo file created here)
- Issue 8-001: Unified website generation pipeline
Notes
The output directory is meant to be the deployment target for Neocities. It should contain only production-ready files that can be uploaded directly. Test artifacts pollute this space and may accidentally be deployed.
ISSUE STATUS: COMPLETED
Created: 2026-01-04
Completed: 2026-01-04
Phase: 8 (Website Completion)
Priority: Medium (cleanup/hygiene)
Summary
Cleaned output directory of 4 test/demo artifacts (76MB total):
- Removed
corner-box-demo.html(Issue 8-007 demo) - Removed
test_similar_1001.html(interactive test output) - Removed
archive/directory (old generated content) - Removed
test/directory (test subdirectories)
Validated HTML generation produces CSS-free output:
- Template uses pure HTML:
<center>,<pre>,<font color="">,<b>,<a> - No
style=attributes in generated markup - No
<style>or<script>blocks in template (only in poem content)