--- name: generate-import-html description: Generate structured HTML from authoring analysis for AEM Edge Delivery Services. Creates section structure, applies block tables, handles metadata, and manages images folder. --- # Generate Import HTML Create plain HTML file with block structure from authoring analysis. ## When to Use This Skill Use this skill when: - You have complete authoring analysis (all sequences have decisions) - You have section styling validation (from authoring-analysis) - Ready to generate the HTML file for preview **Invoked by:** page-import skill (Step 4) ## Prerequisites From previous skills, you need: - ✅ Authoring analysis with block selections (from authoring-analysis) - ✅ Section styling decisions (from authoring-analysis Step 3e) - ✅ metadata.json with paths and metadata (from scrape-webpage) - ✅ cleaned.html with content (from scrape-webpage) - ✅ Block structures fetched (from authoring-analysis Step 3d) ## Related Skills - **page-import** - Orchestrator that invokes this skill - **authoring-analysis** - Provides authoring decisions and styling validation - **scrape-webpage** - Provides metadata, paths, cleaned HTML, images - **preview-import** - Uses this skill's HTML output ## ⚠️ CRITICAL REQUIREMENT: Complete Content Import **YOU MUST IMPORT ALL CONTENT FROM THE PAGE. PARTIAL IMPORT IS UNACCEPTABLE.** - ❌ NEVER truncate or skip sections due to length concerns - ❌ NEVER summarize or abbreviate content - ❌ NEVER use placeholders like "" - ❌ NEVER omit content because the page is "too long" - ✅ ALWAYS import every section from authoring analysis - ✅ ALWAYS include all text, images, and structure from cleaned.html - ✅ If you encounter length issues, generate the FULL HTML anyway **Validation requirement:** You MUST verify that the number of sections in your HTML matches the number of sections from identify-page-structure. If they don't match, you have made an error. --- ## HTML Generation Workflow ### Structure Requirements **IMPORTANT CHANGE:** The AEM CLI now automatically wraps HTML content with headful structure (head, header, footer). You MUST generate ONLY the section content. **What to generate:** - ✅ Section divs with content: `
...
` (one per section) - ✅ Blocks as `
` with nested divs - ✅ Default content (headings, paragraphs, links, images) - ✅ Section metadata blocks where validated in authoring-analysis **What NOT to generate:** - ❌ NO ``, ``, or `` tags - ❌ NO `
` or `