html-exporterlisted
Install: claude install-skill coreline-ai/skills-html-showcase
# HTML Exporter
Build-time helper for exporting finished HTML output directories to PDF, PNG, and WebP without modifying the source HTML.
## Core contract
- Use Chromium/Playwright for rendering. Do **not** use WeasyPrint/wkhtmltopdf for `:has()` theme outputs.
- Treat source HTML as read-only. Do not inject JS or write generated `.html` outside `exports/`.
- Write artifacts only under `<output_dir>/exports/{pdf,png,webp}/` plus `<output_dir>/exports/export-manifest.json`.
- Request themes `light,light2,white,dark,dark2,blue,skyblue,sepia` by default; capture only DOM radios that exist: `input[name="ahf-theme"]#ahf-<theme>`.
- Hide export controls at render time only: `.ahf-themebar`, `.reading-progress`, `.skip`, `.ahf-color-audit`.
- Confirm regression safety from manifest: `html_sha256_unchanged`, `sources_sha256_unchanged`, `validate_issues_unchanged`.
## Quick workflow
1. Identify the output directory, usually `output/<name>`.
2. If the project already has `scripts/export_output.mjs`, use it. Otherwise copy this skill's `scripts/export_output.mjs` into the project `scripts/` directory.
3. Ensure `package.json` contains:
- script: `"export:output": "node scripts/export_output.mjs"`
- dependency: `"playwright"`
- optionalDependency: `"sharp"`
- no root `"type":"module"` required.
4. Run install if needed:
```bash
npm install
```
5. Export:
```bash
npm run export:output -- output/<dir> --clean
```
6. Report:
- command used and exit code
- manifest