Deploy HTML content or files to the web via htmlcode.fun. Use when the user asks to "deploy to web", "host this html", "generate a live link for this frontend", or provides HTML code that needs an online preview. Support for single-file HTML deployment with instant URL generation.
This skill provides a streamlined workflow to take any HTML code or local HTML file and deploy it to a public URL using the htmlcode.fun service.
Run the following command in the terminal:
pwsh ./scripts/deploy.ps1 -Content '<your_html_content>' -Filename 'your_filename.html'
Note: For complex HTML with many quotes, it is safer to write the JSON payload to a temporary file first and use curl directly as shown in the script's implementation.
To avoid shell escaping issues with large HTML strings:
{
"filename": "index.html",
"content": "<!DOCTYPE html>..."
}
curl:
curl -s -X POST https://www.htmlcode.fun/api/deploy -H "Content-Type: application/json" --data-binary "@temp_payload.json"
A successful deployment returns a JSON object:
url: The live public link (e.g., https://www.htmlcode.fun/s/xxxxxx)qrCode: A link to a QR code for mobile access.cooldownSeconds: Wait time before the next deployment.