Skip to main content

ContentLayout

ContentLayout extends BaseLayout with a common content page pattern — an <h1> title, an optional lead paragraph, and an optional hero banner image. It accepts all the same props as BaseLayout, plus a few extras.

---
import ContentLayout from "astro-theme-university/layouts/ContentLayout.astro";
---

<ContentLayout
  title="About the project"
  description="A brief introduction to what we do."
>
  <p>Page content goes here.</p>
</ContentLayout>

Props

ContentLayout accepts all BaseLayout props plus:

Prop Type Default Description
description string | null --- Lead text displayed below the title.

With a hero image

When the heroImage prop is provided, ContentLayout renders the Hero component with the title overlaid on the image, replacing the plain <h1>:

---
import bannerImage from "../assets/images/banner.avif";
---

<ContentLayout
  title="Research & Innovation"
  description="Exploring the frontiers of computing."
  heroImage={bannerImage}
  heroImageAlt="Aerial view of campus"
>
  <p>Content below the hero.</p>
</ContentLayout>

Site config pattern

Like BaseLayout, use a shared config object to avoid repeating site-wide props. See configuration for the full pattern.