Skip to content

Pages

Pages represent static content in your website such as About Us, Contact, Privacy Policy, and landing pages.

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
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])
}

Information about your company, mission, and values.

Contact information, forms, and location details.

Legal information and data protection policies.

Terms and conditions for website usage.

Marketing pages for campaigns and promotions.

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
// Get a page by slug
const page = await trpc.pages.getBySlug.query({
slug: "about-us",
locale: "en"
});
// Create a new page
const 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.