save-as-standalone-html

Featured

Single self-contained file that works offline

AI & Automation 64,796 stars 10637 forks Updated yesterday CC0-1.0

Install

View on GitHub

Quality Score: 92/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Save as standalone HTML Export the current design as a single self-contained HTML file that works completely offline — no external dependencies. ### How it works There is a deterministic bundler (super_inline_html tool) that can inline resources referenced directly in HTML attributes — img src/srcset, source src/srcset, video/audio/track src, video poster, SVG `<image href>`/`<use href>`, link href (stylesheets, favicons), script src, CSS url() and @import, inline style attributes. However, it CANNOT discover resources that are only referenced as strings in JavaScript or JSX code — for example: - An image src set in React: `<img src={"./hero.png"} />` - A background URL in a styled-component: `background: url('./pattern.svg')` - A dynamically imported script Your job is to prepare the HTML file so the bundler can capture everything, then run it. ### Step 1: Make a copy of the HTML file and update code-referenced resources Copy the current HTML file. Read it. Copy its dependencies. Look through ALL the code (inline scripts, imported JSX files, styled-components, etc) for any resource URL that is referenced as a string in code rather than as an HTML attribute. This includes: - Image URLs in React/JSX (`<img src={...} />`, `style={{ backgroundImage: ... }}`) - URLs in CSS-in-JS (styled-components, inline styles set via JS) - Script tags that import other scripts which themselves reference resources - Any fetch() or XMLHttpRequest calls that load assets - Audio/video sour...

Details

Author
asgeirtj
Repository
asgeirtj/system_prompts_leaks
Created
1 years ago
Last Updated
yesterday
Language
JavaScript
License
CC0-1.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category