Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Enterprise-grade research with multi-source synthesis, citation tracking, and verification. 8-phase pipeline with auto-continuation.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
reference/html-generation.md
1# HTML Generation: McKinsey Style Report23## Design Principles45- Sharp corners (NO border-radius)6- Muted corporate colors (navy #003d5c, gray #f8f9fa)7- Ultra-compact layout8- Info-first structure9- 14px base font, compact spacing10- No decorative gradients or colors11- NO EMOJIS in final HTML1213---1415## Generation Steps1617### Step 1: Read McKinsey Template18Load template from: `./templates/mckinsey_report_template.html`1920### Step 2: Extract Key Metrics21Extract 3-4 key quantitative findings for dashboard display at top.2223### Step 3: Convert MD to HTML2425Use Python script:26```bash27cd ~/.claude/skills/deep-research28python scripts/md_to_html.py [markdown_report_path]29```3031**Script outputs two parts:**32- **Part A ({{CONTENT}}):** All sections except Bibliography33- **Part B ({{BIBLIOGRAPHY}}):** Bibliography section only3435**Script handles all conversion:**36- Headers: `##` -> `<div class="section"><h2 class="section-title">`37- Headers: `###` -> `<h3 class="subsection-title">`38- Lists: Markdown bullets -> `<ul><li>` with nesting39- Tables: Markdown tables -> `<table>` with thead/tbody40- Paragraphs: Text wrapped in `<p>` tags41- Bold/italic: `**text**` -> `<strong>`, `*text*` -> `<em>`42- Citations: [N] preserved for tooltip conversion4344### Step 4: Add Citation Tooltips (Optional)4546Attribution Gradients - wrap each [N] citation:47```html48<span class="citation">[N]49<span class="citation-tooltip">50<div class="tooltip-title">[Source Title]</div>51<div class="tooltip-source">[Author/Publisher]</div>52<div class="tooltip-claim">53<div class="tooltip-claim-label">Supports Claim:</div>54[Extract sentence with this citation]55</div>56</span>57</span>58```59NOTE: This step is optional for speed. Basic [N] citations are sufficient.6061### Step 5: Replace Template Placeholders6263| Placeholder | Content |64|-------------|---------|65| {{TITLE}} | Report title (from first ## heading) |66| {{DATE}} | Generation date (YYYY-MM-DD) |67| {{SOURCE_COUNT}} | Number of unique sources |68| {{METRICS_DASHBOARD}} | Metrics HTML from step 2 |69| {{CONTENT}} | HTML from Part A |70| {{BIBLIOGRAPHY}} | HTML from Part B |7172### Step 6: Verify HTML7374```bash75python scripts/verify_html.py --html [html_path] --md [md_path]76```77- Pass: Proceed to open78- Fail: Fix errors and re-run7980### Step 7: Open in Browser81```bash82open [html_path]83```8485---8687## PDF Generation8889**Option A: WeasyPrint Direct (Preferred)**90911. Create print-optimized HTML following `./reference/weasyprint_guidelines.md`922. Critical CSS:93- `page-break-inside: avoid` on tables, boxes94- `page-break-after: avoid` on headings95- `orphans: 3; widows: 3` on paragraphs96- Use `display: table` not Flexbox/Grid97- Font sizes in pt (10pt body, 8pt citations)983. Generate: `weasyprint [html_path] [pdf_path]`994. Open: `open [pdf_path]`100101**Option B: generating-pdf Skill**102103Use Task tool with general-purpose agent, invoke generating-pdf skill.104