Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extracts a part of a website and converts it to a Jaspr component. Use when you need to migrate a part of a website to Jaspr.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 158% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -36% | 0% |
This document outlines the process and key learnings from extracting a complex HTML component from a live website to a Jaspr component using Dart.
Use this skill when you need to extract a part of a website and migrate it to Jaspr.
The migration process follows a strict "Structure Only" approach:
curl to fetch the raw HTML. This ensures you get the initial server-rendered markup without client-side modifications.curl for the source extraction.StatelessComponent for the extracted HTML.div, nav, ul, li, img, etc.).x- attributes from alpine.js) as is and DO NOT ATTEMPT TO RE-IMPLEMENT LOGIC in Dart.When encountering assets (images, videos, etc.), look for them in /assets/src/img or /assets/src/video. Note: The production site appends hashes to asset names, but the source files do not have them.
Use the asset() function imported from lib/constants/asset_loader.dart with the non-hashed filename. It returns the correct path after bundling.
dartimg(src: asset('my-image.png'), alt: 'My Image')
For components with repetitive or dynamic content (like carousels, event grids, or country lists), separate the data from the structure:
content/_data/ (e.g., my_data_file.yaml).package:jaspr_content/jaspr_content.dart to access the data in your component.dartimport 'package:jaspr_content/jaspr_content.dart'; // Inside build method final items = context.page.data['my_data_file'] as List? ?? []; div(classes: 'grid', [ for (final item in items) _buildItem(item as Map<String, dynamic>), ])
When possible, reuse existing sections from lib/components/sections like the CtaSection or NewsletterSection.
Do not add new sections yourself.
The desired outcome is 1-to-1 translation of the HTML to Jaspr. The component should be as close to the original HTML as possible.
Fidelity is King: When porting, trust that the original CSS/HTML structure is correct. Don't refactor the structure while migrating the technology. Data-driven patterns should enhance maintainability without changing the rendered HTML.
Other measured skills in the registry, with their headline benchmark lift.