Page vs HTML Member:
Use Page for complete web pages with routing, SEO, and hydration (e.g., dashboards, landing pages).
Use HTML for fragments and templates (e.g., email templates, PDF content, reusable components).
See HTML member for template-only use cases.
Overview
The Page member type enables you to build complete web applications with automatic routing, server-side rendering, SEO optimization, and client-side interactivity. Think of it as a mini web server that turns your Conductor worker into a full-featured application. Key Features:- 🎯 Automatic Routing - Convention-based routes with zero configuration
- ⚡ Server-Side Rendering - Fast initial page loads
- 🔄 Client Hydration - htmx, progressive enhancement, or islands architecture
- 🔍 SEO Optimized - Built-in meta tags, Open Graph, JSON-LD support
- 🔐 Auth & Security - Route-level authentication and rate limiting
- 💾 Smart Caching - Edge caching with flexible invalidation
- 🎨 Layout System - Reusable layouts across pages
Basic Usage
Simple Page
Create a page atpages/about/page.yaml:
/about.
Homepage (Index)
Createpages/index/page.yaml for your homepage:
index automatically routes to /.
Routing
Convention-Based Routing
Pages automatically get routes based on their names:| Page Name | Route | Example URL |
|---|---|---|
index | / | yoursite.com/ |
about | /about | yoursite.com/about |
dashboard | /dashboard | yoursite.com/dashboard |
blog-post | /blog-post | yoursite.com/blog-post |
Dynamic Routes
Use:param syntax for dynamic segments:
$input.slug:
Explicit Route Configuration
Override conventions with explicit routes:none- Public page (default)required- Must be authenticatedoptional- Auth optional but user data available
Render Modes
Server-Side Rendering (SSR)
Default mode - renders HTML on the server:Static Rendering
For pages that don’t change often:Hybrid Rendering
SSR with client-side hydration for interactivity:Client-Side Hydration
htmx (Recommended)
Add interactive features with minimal JavaScript:hx-get- Load content from URLhx-post- Submit formshx-target- Where to put the responsehx-swap- How to swap contenthx-trigger- When to trigger request
Progressive Enhancement
Enhance forms and links automatically:Islands Architecture
Hydrate specific components only:No Hydration
For static content only:SEO Configuration
Basic SEO
Open Graph (Social Sharing)
Structured Data (JSON-LD)
Layouts
Reuse layouts across multiple pages:Caching
Enable Edge Caching
Cache by User
Disable Caching
For user-specific or real-time pages:Styling
Inline Styles
External Stylesheets
Complete Example
A full-featured dashboard page:Integration with Worker
The PageRouter automatically handles all your pages:Best Practices
1. Use Convention-Based Routing
Let the framework handle routing for simple pages:2. Enable Caching for Static Pages
3. Use htmx for Interactivity
Avoid heavy JavaScript frameworks:4. Optimize SEO
Always provide title, description, and meta tags:5. Disable Caching for User Pages
6. Use Dynamic Routes
For content-driven pages:Default Error Pages
Conductor includes beautifully designed error pages that you can customize. When you initialize a new Conductor project, you get four default error pages:Included Error Pages
- 401 Unauthorized -
/errors/401- Shown when authentication is required - 403 Forbidden -
/errors/403- Shown when user lacks permissions - 404 Not Found -
/errors/404- Shown when page doesn’t exist - 500 Internal Server Error -
/errors/500- Shown when server errors occur
Customizing Error Pages
All error pages are located inpages/errors/ and can be fully customized:
Customization Options
1. Update the design:Using Error Pages in Routes
Reference error pages in your route failure handlers:Error Page Best Practices
- Keep them public - Error pages should have
auth: public - Add security headers - Include
X-Frame-Options,X-Content-Type-Options - Cache 404s - Enable caching for 404 pages to reduce load
- Don’t cache 500s - Disable caching for server errors
- Provide helpful actions - Include links to home, search, or support
- Brand consistently - Match your application’s design system
- Add analytics - Track error pages to identify issues
Error Page Routing
Error pages use standard page routing with security headers:Page vs HTML Member
| Feature | Page | HTML |
|---|---|---|
| Use Case | Full web pages | Templates & fragments |
| Routing | ✅ Automatic | ❌ No routing |
| SEO | ✅ Full support | ❌ N/A |
| Hydration | ✅ Multiple strategies | ❌ N/A |
| Caching | ✅ Edge caching | ❌ N/A |
| Auth | ✅ Route-level | ❌ N/A |
| Output | Full HTML document | HTML fragment |
| Best For | Dashboards, landing pages | Emails, PDFs, components |
Configuration Reference
Route Config
Render Mode
ssr- Server-side rendering (default)static- Static renderinghybrid- SSR + hydration
Hydration Strategy
none- No client-side JavaScripthtmx- htmx-powered interactivity (recommended)progressive- Progressive enhancementislands- Islands architecture
Cache Config
Related
- HTML Member - For templates and fragments
- Form Member - For form handling
- API Member - For REST endpoints

