Extract a DESIGN.md file from a public webpage
extract_design_mdWrites a starter DESIGN.md file from the CSS of one public webpage. Best for: a user who gives a website address and wants its colors, fonts, spacing, corner radii and component styles as a DESIGN.md file. Returns: markdown (the DESIGN.md text in the open Google format, YAML tokens then the 8 standard sections), the lint verdict of @google/design.md 0.4.0 on that text, the token counts and the number of stylesheets read. Pass url, such as "https://stripe.com"; a bare host such as "stripe.com" means https. Do not use for: pages behind a login, private or local addresses (localhost, 192.168.x.x), pages that robots.txt disallows, or a DESIGN.md file the user already has (use lint_design_md). Errors: blocked_url, invalid_url, robots_disallowed, fetch_failed and http_error each say what to send next.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Address of one public webpage, such as "https://stripe.com". A bare host such as "stripe.com" means https. Only public http and https pages work: no login pages, localhost or private addresses. | |
| include_raw_css | No | When true, adds the concatenated CSS that was read to rawCss. The response gets large, so leave it off unless the user asks for the CSS. Default false. | |
| max_stylesheets | No | How many linked stylesheets to fetch and parse, 1 to 10. Default 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lint | Yes | The official @google/design.md linter's verdict on markdown | |
| rawCss | No | The concatenated CSS that was read; present only when include_raw_css is true | |
| document | Yes | The extracted tokens, layout regions and rules before they are written as markdown | |
| markdown | Yes | DESIGN.md in the open format (YAML tokens, then the 8 sections), ready to save | |
| metadata | Yes |