원클릭으로
generate-import-html
// Generate structured HTML from authoring analysis for AEM Edge Delivery Services. Creates section structure, applies block tables, handles metadata, and manages images folder.
// Generate structured HTML from authoring analysis for AEM Edge Delivery Services. Creates section structure, applies block tables, handles metadata, and manages images folder.
Review code for AEM Edge Delivery Services projects. Use at the end of development (before PR) for self-review, or to review pull requests. Validates code quality, performance, accessibility, and adherence to EDS best practices.
Analyze content sequences and determine authoring approach (default content vs blocks). Validates block selection and section styling for import/migration to AEM Edge Delivery Services.
Survey available blocks from local AEM Edge Delivery Services project and Block Collection to understand the block palette available for authoring. Returns block inventory with purposes to inform content modeling decisions.
Searches the aem.live documentation for information on AEM Edge Delivery Services features. Use this skill when you need more information about a feature, want guidance on how to implement a feature, and using existing tools you have to search the web isn't turning up relevant results.
Identify section boundaries and content sequences within a scraped webpage for AEM Edge Delivery Services import. Performs two-level analysis (sections, then sequences per section) and surveys available blocks.
Analyze content sequences within a section and provide neutral descriptions for AEM Edge Delivery Services. Invoked per section during page import to identify breaking points between default content and blocks.
| 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. |
Create plain HTML file with block structure from authoring analysis.
Use this skill when:
Invoked by: page-import skill (Step 4)
From previous skills, you need:
YOU MUST IMPORT ALL CONTENT FROM THE PAGE. PARTIAL IMPORT IS UNACCEPTABLE.
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.
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:
<div>...</div> (one per section)<div class="block-name"> with nested divsWhat NOT to generate:
<html>, <head>, or <body> tags<header> or <footer> elements<main> wrapper elementStructure format:
<div>
<!-- Section 1 content -->
</div>
<div>
<!-- Section 2 content with section-metadata if needed -->
<div class="section-metadata">
<div>
<div>Style</div>
<div>grey</div>
</div>
</div>
<!-- Section 2 blocks/content -->
</div>
<div>
<!-- Section 3 content -->
</div>
For detailed block structure patterns: See ../page-import/resources/html-structure.md
Apply validated decisions from authoring-analysis Step 3e:
WITH section-metadata (section provides container styling):
<div>
<div class="section-metadata">
<div>
<div>Style</div>
<div>dark</div>
</div>
</div>
<div class="tabs">
<!-- Tabs block content -->
</div>
</div>
WITHOUT section-metadata (background is block-specific):
<div>
<div class="hero">
<!-- Hero block content with its own dark background -->
</div>
</div>
Important:
section-metadata div at the start of each section that needs styling<div> elementUnless user explicitly requested to skip metadata, use the metadata extracted from scrape-webpage to generate a metadata block.
Process:
1. Review extracted metadata from metadata.json
2. Map each property to standard format:
Title:
title (or og:title) with first H1 on pagetitle propertyDescription:
description (or og:description) with first paragraphdescription propertyImage:
og:imageimage propertyCanonical:
canonical propertyTags:
article:tag or keywords → comma-separated tags propertyProperties to SKIP (platform auto-populates):
og:url, og:title, og:description, twitter:title, twitter:description, twitter:imageviewport, charset, X-UA-Compatible (belong in head.html)3. Generate metadata block HTML:
<div>
<div class="metadata">
<div>
<div>title</div>
<div>[Your mapped title]</div>
</div>
<div>
<div>description</div>
<div>[Your mapped description]</div>
</div>
<!-- Only include image if custom -->
<!-- Only include canonical if differs from page URL -->
<!-- Only include tags if present -->
</div>
</div>
Append metadata block as the last section div at the end of the HTML file.
Detailed guidance: See resources/metadata-extraction.md and resources/metadata-mapping.md
The images are currently in ./import-work/images/ and the HTML references them as ./images/.... You MUST handle the images folder correctly:
Step 1: Determine the correct images folder location
Based on paths.htmlFilePath from metadata.json:
us/en/about.plain.html → Images should be at: us/en/images/products/widget.plain.html → Images should be at: products/images/index.plain.html → Images should be at: images/Rule: Images folder goes in the same directory as the HTML file.
Step 2: Copy the images folder
# Example: If HTML is at us/en/about.plain.html
mkdir -p us/en/images
cp -r ./import-work/images/* us/en/images/
Step 3: Verify image paths in HTML are correct
The HTML should already reference images as ./images/... which is correct for files in the same directory. No path changes needed in the HTML.
Example:
HTML location: us/en/about.plain.html
Images location: us/en/images/
Image reference in HTML: <img src="./images/abc123.jpg">
Result: ✅ Correct - browser resolves to us/en/images/abc123.jpg
Save to: Use paths.htmlFilePath from metadata.json (e.g., us/en/about.plain.html)
Read the metadata.json file from scrape-webpage to get the correct file path.
Before proceeding to preview-import skill, verify:
<div> sections as identified in identify-page-structureIf any validation check fails, STOP and fix before proceeding.
This skill provides:
us/en/about.plain.html)us/en/images/)Next step: Pass HTML file path to preview-import skill