WebSim URL Structure and Syntax Guide

WebSim uses a special URL syntax to create fully interactive websites within a single URL. This guide explains the structure and capabilities of WebSim URLs.

Basic Structure

A basic WebSim URL has the following format:

https://websim.ai/[website-name]

For example: https://websim.ai/my-first-site

This will create a new website with the specified name. The AI will intelligently infer what type of site to generate based on the name.

Query Parameters

You can further customize the generated site by including query parameters in the URL. Query parameters start with a question mark (?) and are separated by ampersands (&).

Format

?format=[html|markdown]

Specifies whether the AI should return HTML or Markdown. Defaults to HTML.

Topic

?topic=[topic]

Provides a hint about the desired topic or theme of the generated site. Can be a word or phrase.

Example: https://websim.ai/space-travel-portal?topic=future+mars+missions

Elements

?elements=[element1],[element2],...

Comma-separated list of specific HTML elements or features to include, like forms, tables, animations, etc.

Example: https://websim.ai/job-board?elements=search+form,job+listings

Style

?style=[CSS code]

Inline CSS code to customize the look and feel of the page. Appended to the AI-generated CSS.

Headings and Subpages

You can create an outline of headings and nested pages using slashes and dashes in the URL path:

https://websim.ai/example-site/heading1/subheading1
https://websim.ai/example-site/heading1/subheading2 
https://websim.ai/example-site/heading2
https://websim.ai/example-site/heading2/another-subpage

The AI will intelligently generate page content to fit this implied structure and hierarchy.

Conclusion

WebSim URLs provide a powerful way to rapidly prototype and share interactive websites. By combining an expressive path structure with query parameter customization, the possibilities are practically limitless. We can't wait to see what you create!

For more guides and examples, check out the WebSim Guides section. Happy building!