A modernized custom website publisher that allows you to store and serve HTML websites via Val Town. Originally designed to work with Glif for AI-generated websites, but now supports any HTML content with password protection and public indexing!
ā ļø Important: All pages published to this service are public and visible to everyone on the index page. Use password protection only to prevent unauthorized updates, not for privacy.
# POST HTML content directly curl -X POST "https://your-val-url.web.val.run/?key=my-site" \ -H "Content-Type: text/html" \ -d "<html><body><h1>Hello World!</h1></body></html>" # POST with password protection (for new pages) curl -X POST "https://your-val-url.web.val.run/?key=my-site&password=secret123" \ -H "Content-Type: text/html" \ -d "<html><body><h1>Protected Page!</h1></body></html>" # Update password-protected page curl -X POST "https://your-val-url.web.val.run/?key=my-site&password=secret123" \ -H "Content-Type: text/html" \ -d "<html><body><h1>Updated Content!</h1></body></html>" # POST JSON with HTML (legacy format) curl -X POST "https://your-val-url.web.val.run/?key=my-site" \ -H "Content-Type: application/json" \ -d '{"data": "<html><body><h1>Hello World!</h1></body></html>"}'
# View in browser https://your-val-url.web.val.run/?key=my-site # View index page (lists all public pages) https://your-val-url.web.val.run/ # Get JSON response with metadata https://your-val-url.web.val.run/?key=my-site&format=json
| Method | URL Pattern | Description |
|---|---|---|
GET | / | Public index page listing all published websites |
GET | /?key=<key> | View published website |
POST | /?key=<key> | Publish HTML content |
POST | /?key=<key>&password=<pass> | Publish with password protection |
GET | /?key=<key>&format=json | Get website data as JSON |
key (required for publish/view): Website identifier
my-site, blog_2024, test-page-1password (optional): Password for page protection
X-Password headerformat (optional): Response format
html (default): Returns rendered HTMLjson: Returns JSON with metadataReturns the published HTML with a small footer indicating it's hosted by valtownGeocities.
{ "data": { "html": "<html>...</html>", "createdAt": "2025-11-21T14:56:57.968Z", "updatedAt": "2025-11-21T14:56:57.968Z", "size": 2722 } }
{ "key": "my-site", "size": 2722, "createdAt": "2025-11-21T14:56:57.968Z", "updatedAt": "2025-11-21T14:56:57.968Z", "message": "Website published successfully", "passwordProtected": true }
# Create password-protected page curl -X POST "https://your-val-url.web.val.run/?key=secret-page&password=mypassword123" \ -H "Content-Type: text/html" \ -d "<html><body><h1>This page is protected!</h1></body></html>" # Update the protected page (requires password) curl -X POST "https://your-val-url.web.val.run/?key=secret-page&password=mypassword123" \ -H "Content-Type: text/html" \ -d "<html><body><h1>Updated protected content!</h1></body></html>" # Try to update without password (will fail) curl -X POST "https://your-val-url.web.val.run/?key=secret-page" \ -H "Content-Type: text/html" \ -d "<html><body><h1>This will fail!</h1></body></html>" # Returns: 401 Unauthorized - Password required for this page
The index page (/) shows all published websites in a beautiful, responsive interface:
data fieldYou can still use this with Glif for AI-generated websites:
&password=yourpassword to the Glif's POST URL for protectionhttps://your-val-url.web.val.run/?key=YOURKEYHEREāāā backend/
ā āāā index.ts # Main backend application (Hono)
āāā frontend/
ā āāā index.html # Public index page interface
āāā shared/
ā āāā types.ts # Shared TypeScript types
āāā main.tsx # Entry point (redirects to backend)
āāā README.md # This documentation
# Test the modernized version curl -X POST "https://your-val-url.web.val.run/?key=test" \ -H "Content-Type: text/html" \ -d "<!DOCTYPE html><html><head><title>Test</title></head><body><h1>It works!</h1><p>Large HTML support ā </p></body></html>" # View the result curl "https://your-val-url.web.val.run/?key=test" # Get JSON metadata curl "https://your-val-url.web.val.run/?key=test&format=json" # Create password-protected page curl -X POST "https://your-val-url.web.val.run/?key=protected&password=secret123" \ -H "Content-Type: text/html" \ -d "<!DOCTYPE html><html><head><title>Protected</title></head><body><h1>Protected Page</h1></body></html>"
[object Object] Display: Fixed the major bug where websites showed [object Object] instead of actual HTML contentThis project is built on Val Town. To contribute:
Open source and available for modification and redistribution. Built with ā¤ļø on Val Town.