> ## Documentation Index
> Fetch the complete documentation index at: https://buttercms.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom blog (Page Types)

> Learn how to build a custom blog for your app, powered by ButterCMS Page Types

> [!TIP]
>
> If you don't need the ability to fully customize your blog, you can [try out one of our tutorials](https://buttercms.com/docs/build-your-app/how-to-recipes/build/building-a-blog-blog-engine.md) that leverages the ButterCMS blog engine, instead!

ButterCMS Page Types give you a dynamic, flexible, fully customizable schema for building a blog that matches your exact requirements. Follow the steps below to set one up.

> [card] [Pages core concepts](https://buttercms.com/docs/core-concepts/content-types/pages.md)
>
> For a deeper look at ButterCMS Pages, check out our core concepts article. Learn about creating Pages, choosing between the blog engine and a custom Page Type, the API, and more.

## Step 1: Create a new Page Type

In your ButterCMS dashboard, click on "Content Types", then click "New Content Type" and select "Page Type".

## Step 2: Add custom fields

Add the fields that you want to include on the schema for your Blog Page Type. Common combinations include:

* **Short Text**: use this for the post **Title**
* **WYSIWYG**: use this for the post **Body**, giving editors a rich text editing experience
* **Date field**: although the ButterCMS automatically returns `created` and `updated` dates for Pages, you may want the ability to manually set custom dates and times.
* **Reference**: link to related content, such as a Collection of **Authors**, **Categories**, or **Tags**.
* **Components**: great to set up blocks for CTAs, hero banners, SEO, and more
* **Component Picker**: use this field type to create an allowlist of selectable components for dynamic layouts

> [!TIP]
>
> You can't set up a Reference to a Collection that doesn't exist, yet! You can either go back and edit the Page Type schema once your Collections are set up, or you can set up your Collections first.

The combinations are endless, so design the schema that fits your content model.

## Step 3: Configure and save your Page Type

Name your Page Type (e.g., `Blog Post`), review your fields, and save. This schema can now be reused for every post you create under that type.

## Step 4: Link authors to Blog Posts

To associate authors with posts:

1. Create a **Collections** entry called `Authors` with fields such as **Name**, **Slug**, and **Image**.
2. On your Blog Post Page Type, add a **Reference** field pointing to the `Authors` collection.
3. When querying the API, you can use dot notation to filter on the various Page fields, allowing you to fetch posts by Author or Tag, for example.

```text theme={null}
?fields.author.slug=your-author-slug
```

## Implementation examples

> [card] [Swift](https://buttercms.com/blog/swift-app-tutorial-build-a-custom-blog)
>
> Build a custom blog with Swift and ButterCMS Page Types


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.