Pages
Pages represent static content in your website such as About Us, Contact, Privacy Policy, and landing pages.
Page Structure
Section titled “Page Structure”Pages in Stelo CMS are designed for content that:
- Has a fixed URL structure
- Doesn’t change frequently
- Serves as foundational site content
- Requires SEO optimization
Page Schema
Section titled “Page Schema”model Page { id String @id @default(cuid()) slug Json // Localized slugs title Json // Localized titles content Json // Localized rich content excerpt Json? // Localized excerpts metadata Json? // SEO and custom metadata
published Boolean @default(false) publishedAt DateTime? featured Boolean @default(false)
createdAt DateTime @default(now()) updatedAt DateTime @updatedAt
authorId String? author User? @relation(fields: [authorId], references: [id])}Common Page Types
Section titled “Common Page Types”About Us
Section titled “About Us”Information about your company, mission, and values.
Contact
Section titled “Contact”Contact information, forms, and location details.
Privacy Policy
Section titled “Privacy Policy”Legal information and data protection policies.
Terms of Service
Section titled “Terms of Service”Terms and conditions for website usage.
Landing Pages
Section titled “Landing Pages”Marketing pages for campaigns and promotions.
Page Management
Section titled “Page Management”Pages support full CRUD operations:
- Create new pages with multilingual content
- Edit existing page content and metadata
- Publish/unpublish pages
- SEO optimization with custom meta tags
- URL slug management per locale
API Usage
Section titled “API Usage”// Get a page by slugconst page = await trpc.pages.getBySlug.query({ slug: "about-us", locale: "en"});
// Create a new pageconst newPage = await trpc.pages.create.mutate({ title: { en: "About Us", fr: "À Propos" }, content: { en: { body: "<p>About our company...</p>" }, fr: { body: "<p>À propos de notre entreprise...</p>" } }, slug: { en: "about-us", fr: "a-propos" }});Pages form the foundation of your website’s content structure, providing stable, SEO-friendly URLs for your most important information.