Skip to content

Pages

Pages represent paths on your site and allow comments to be filtered for each one. This is ideal for blogs, documentation, or any multi-page content.

Pages are automatically created when a new comment is posted on a path that doesn’t exist yet, or you can add them manually via the dashboard.

Read more about Comments.

Create a new page

To create a new page, follow these steps:

  1. In the dashboard, click the “Add Page” button.
  2. Enter the page’s URL and click “Create Page”.

note This url should match the URL path of the page on your site, e.g. /blog/my-post or /contact.

  1. That’s it! You’re now ready to start adding comments to your page.

Import pages

Import from Sitemap

To import pages from a sitemap, follow these steps:

  1. In the dashboard, click the “Add Pages” dropdown and select “Import from Sitemap”.
  2. Enter the URL of the sitemap and click “Fetch sitemap”.
  3. Select the pages you want to import and click “Import Selected”.

All selected pages will be added to your site.

Import from Storyblok

To import pages from Storyblok, follow the step in the Storyblok integration guide.

Page settings

When a page is created, you can update the following details:

  • Title: The name of your page.
  • URL: The URL of your page.
  • Allow comments: Enable comments on this page. If disabled, comments will not be saved for this page.

Via the API

List all pages

Get all pages related to a site via the x-site-id header

Request

GET /pages

Available query parameters

  • page - The page number to return, defaults to 1

Response

{
"data": [
{
"id": "01j50c3ex8t6aw1ez40wys52j4",
"created_at": "2024-08-11T09:25:24.000000Z",
"updated_at": "2024-08-11T09:25:37.000000Z",
"title": "Hello World",
"slug": "/blog/hello-world",
"allow_comments": true,
"site_id": "01j509cg4wwxtdtef3xws5kgf2",
"team_id": "01j4sjct8ps0dntdjthexpqwxh"
}
],
"meta": {
"current_page": 1,
"per_page": 25,
"total": 1
}
}

Get a page

Get a single page by Slug

Request

GET /pages/slug?slug=/blog/hello-world

Response

{
"id": "01j50c3ex8t6aw1ez40wys52j4",
"created_at": "2024-08-11T09:25:24.000000Z",
"updated_at": "2024-08-11T09:25:37.000000Z",
"title": "Hello World",
"slug": "/blog/hello-world",
"allow_comments": true,
"site_id": "01j509cg4wwxtdtef3xws5kgf2",
"team_id": "01j4sjct8ps0dntdjthexpqwxh"
}

Create a page

Create a new page. Ensure the x-site-id header is set to the site you want to create the page in.

Request

POST /pages

Request body

{
"title": "Hello World",
"slug": "/blog/hello-world",
"allow_comments": true
}

Response

{
"id": "01j50c3ex8t6aw1ez40wys52j4",
"created_at": "2024-08-11T09:25:24.000000Z",
"updated_at": "2024-08-11T09:25:37.000000Z",
"title": "Hello World",
"slug": "/blog/hello-world",
"allow_comments": true,
"site_id": "01j509cg4wwxtdtef3xws5kgf2",
"team_id": "01j4sjct8ps0dntdjthexpqwxh"
}

Update a page

Update an existing page

Request

PUT /pages/01j50c3ex8t6aw1ez40wys52j4

Request body

{
"allow_comments": false
}

Response

{
"id": "01j50c3ex8t6aw1ez40wys52j4",
"created_at": "2024-08-11T09:25:24.000000Z",
"updated_at": "2024-08-11T09:25:37.000000Z",
"title": "Hello World",
"slug": "/blog/hello-world",
"allow_comments": false,
"site_id": "01j509cg4wwxtdtef3xws5kgf2",
"team_id": "01j4sjct8ps0dntdjthexpqwxh"
}