Building Your First Site
This tutorial walks you through creating a website using ReadySite's AI-native CMS.
Prerequisites
- Go 1.24+ installed
- Git
Step 1: Install ReadySite
# Clone the repository
git clone https://github.com/readysite/readysite.git
cd readysite
# Run the website CMS
go run ./website
Open http://localhost:5000 in your browser.
Step 2: Complete Setup Wizard
On first run, you'll see the setup wizard:
-
Create Admin Account
- Enter your email and password
- This becomes your admin login
-
Configure AI Provider
- Select your AI provider (Anthropic, OpenAI, etc.)
- Enter your API key
- Choose a model
-
Site Information
- Set your site name
- Add a site description
Click "Complete Setup" to finish.
Step 3: Create Your First Page
- Click Pages in the sidebar
- Click New Page
- Fill in the form:
- Title: "About Us"
- Slug: "about" (auto-generated from title)
- Content: Add your HTML content
<div class="container mx-auto p-8">
<h1 class="text-4xl font-bold mb-4">About Us</h1>
<p class="text-lg">Welcome to our website!</p>
</div>
- Click Save
Your page is now available at /about.
Step 4: Create a Collection
Collections are like database tables for dynamic content.
- Click Collections in the sidebar
- Click New Collection
- Name it "Blog Posts"
- Add fields:
| Field | Type | Required |
|---|---|---|
| title | Text | Yes |
| content | Text | No |
| published | Boolean | No |
| publishedAt | Date | No |
- Click Save
Step 5: Add Documents
Documents are records in a collection.
-
Select your "Blog Posts" collection
-
Click New Document
-
Fill in the fields:
- title: "Hello World"
- content: "This is my first post"
- published: true
- publishedAt: today's date
-
Click Save
Step 6: Display Collection Data in Pages
Update your page HTML to display blog posts:
<div class="container mx-auto p-8">
<h1 class="text-4xl font-bold mb-8">Blog</h1>
{{range $post := documents "blog-posts"}}
<article class="mb-8 p-6 bg-base-200 rounded-lg">
<h2 class="text-2xl font-bold">{{$post.GetString "title"}}</h2>
<p class="mt-2">{{$post.GetString "content"}}</p>
{{with $date := $post.GetTime "publishedAt"}}
<time class="text-sm text-base-content/60">{{$date.Format "Jan 2, 2006"}}</time>
{{end}}
</article>
{{else}}
<p class="text-base-content/60">No posts yet.</p>
{{end}}
</div>
Available template functions:
documents "collection-name"- Get all documentsdocument "collection-name" "id"- Get single documentsite_name- Site namesite_description- Site description
Step 7: Use AI Chat
The AI assistant can help you build and manage your site.
- Click the chat icon in the sidebar
- Try these prompts:
Create content:
Create a contact page with a form
Update existing content:
Update the About page to add our team members
Manage collections:
Add a new blog post about getting started
The AI will execute tools to create/update content, and you can undo any changes.
Step 8: Publish Your Site
Pages have a "Published" toggle:
- Published: Visible to the public
- Unpublished: Only visible in admin
Toggle the publish state in the page editor.
Step 9: Deploy to Production
- Set environment variables:
export AUTH_SECRET="your-secure-secret-here"
export ENV="production"
- Build and deploy:
go run ./cmd/launch --new website
This creates a server and deploys your website.
Next Steps
- Endpoints: Create serverless Lua functions at
/admin/endpoints - File uploads: Upload images and documents at
/admin/files - Access control: Set permissions on content
Template Reference
Document Methods
{{$doc.GetString "field"}} <!-- String value -->
{{$doc.GetInt "field"}} <!-- Integer value -->
{{$doc.GetBool "field"}} <!-- Boolean value -->
{{$doc.GetTime "field"}} <!-- time.Time value -->
{{$doc.GetStrings "field"}} <!-- []string value -->
Page Hierarchy
{{range $page := pages}}
<a href="{{$page.Path}}">{{$page.Title}}</a>
{{end}}
{{range $child := page.Children}}
<a href="{{$child.Path}}">{{$child.Title}}</a>
{{end}}
Conditional Content
{{if $doc.GetBool "featured"}}
<span class="badge">Featured</span>
{{end}}
{{with $author := $doc.GetString "author"}}
<span>By {{$author}}</span>
{{end}}
Troubleshooting
"Page not found" for published page
- Check that the page is published (toggle on)
- Verify the URL matches the page slug
AI chat not working
- Verify your API key in Settings
- Check the browser console for errors
Collection data not showing
- Ensure the collection name matches exactly (use slugified name)
- Check that documents exist in the collection