---
title: "Pages"
description: "Create landing pages and content templates"
url: "https://publish.dev/docs/pages.md"
section: "Docs"
---

> Breadcrumbs: Docs > Pages
> Sitemap: https://publish.dev/docs/sitemap.md
> LLMS index: https://publish.dev/docs/llms.txt

# Pages

## Landing pages

Add `index.tsx` to a group's root to create its landing page. For example, `publish.os/docs/index.tsx` renders `/docs`.

```txt
publish.os/
└── docs/
    ├── index.tsx
    └── content/
        └── install.mdx
```

```tsx
// publish.os/docs/index.tsx
import type { IndexPageProps } from "@publish.os/nextjs/types";

export default function DocsPage({ site }: IndexPageProps) {
  return <main><h1>{site.name} docs</h1></main>;
}
```

## Content templates

Add `page.tsx` next to the group's `content/` directory to set the template for its content pages. For example, this template renders `/blog/hello-world`.

```txt
publish.os/
└── blog/
    ├── page.tsx
    └── content/
        └── hello-world.mdx
```

```tsx
// publish.os/blog/page.tsx
import { MDX } from "@publish.os/nextjs/mdx";
import type { PageProps } from "@publish.os/nextjs/types";

export default function BlogPost({ page }: PageProps) {
  return (
    <article>
      <h1>{page.frontmatter.title}</h1>
      <MDX page={page} />
    </article>
  );
}
```

## Continue reading
- Previous: [Groups](https://publish.dev/docs/groups.md)

## Section links
- [Docs home](https://publish.dev/docs)
- [LLMS index](https://publish.dev/docs/llms.txt)
- [Sitemap](https://publish.dev/docs/sitemap.md)