sittari-studio

pages

by sittari-studio
payload-plugins
Publishing workflow
v4
^4.0.0-0
MIT

Overview

Summary generated from the README

Adds a pages collection to Payload with a required title and a page type selector that shows one conditional field group per type. Page types are configured through the plugin options, with optional factories for standard rich-text content and flexible block layouts. Drafts, versions and autosave are enabled by default, and an overrides callback can modify the final collection. It targets Payload 4.

Features

  • Versioned pages collection with drafts and autosave every 375 milliseconds
  • Page types keyed by name, each rendered as a conditional field group
  • Built-in factories for a standard rich-text page and a block-based flexible page
  • Localized title that can be switched off with an option
  • Overrides callback to change access control, hooks, admin settings or fields
  • English, Russian and Ukrainian labels included

Use cases

  • Set up a pages collection with several layouts such as article pages and block-built landing pages
  • Build a multilingual site where page titles and content are localized
  • Pair with a permalink plugin to give pages WordPress-style slugs and URLs

From the author

PayloadCMS pages plugin.

Installation

npm i @sittari/payload-pages

0

Stars

0

Forks

0

Open Issues

2 months ago

Last Updated

31

Weekly Downloads

v2.1.0

npm Version

25.1 KB

Unpacked Size

0

Dependencies

Repository stars

00 since Sep 6

Show data
Repository stars by day (UTC)
DateStars
Dec 5, 20260
Dec 4, 20260
Dec 3, 20260
Dec 2, 20260
Dec 1, 20260
Nov 30, 20260
Nov 29, 20260
Nov 28, 20260
Nov 27, 20260
Nov 26, 20260
Nov 25, 20260
Nov 24, 20260
Nov 23, 20260
Nov 22, 20260
Nov 21, 20260
Nov 20, 20260
Nov 19, 20260
Nov 18, 20260
Nov 17, 20260
Nov 16, 20260
Nov 15, 20260
Nov 14, 20260
Nov 13, 20260
Nov 12, 20260
Nov 11, 20260
Nov 10, 20260
Nov 9, 20260
Nov 8, 20260
Nov 7, 20260
Nov 6, 20260
Nov 5, 20260
Nov 4, 20260
Nov 3, 20260
Nov 2, 20260
Nov 1, 20260
Oct 31, 20260
Oct 30, 20260
Oct 29, 20260
Oct 28, 20260
Oct 27, 20260
Oct 26, 20260
Oct 25, 20260
Oct 24, 20260
Oct 23, 20260
Oct 22, 20260
Oct 21, 20260
Oct 20, 20260
Oct 19, 20260
Oct 18, 20260
Oct 17, 20260
Oct 16, 20260
Oct 15, 20260
Oct 14, 20260
Oct 13, 20260
Oct 12, 20260
Oct 11, 20260
Oct 10, 20260
Oct 9, 20260
Oct 8, 20260
Oct 7, 20260
Oct 6, 20260
Oct 5, 20260
Oct 4, 20260
Oct 3, 20260
Oct 2, 20260
Oct 1, 20260
Sep 30, 20260
Sep 29, 20260
Sep 28, 20260
Sep 27, 20260
Sep 26, 20260
Sep 25, 20260
Sep 24, 20260
Sep 23, 20260
Sep 22, 20260
Sep 21, 20260
Sep 20, 20260
Sep 19, 20260
Sep 18, 20260
Sep 17, 20260
Sep 16, 20260
Sep 15, 20260
Sep 14, 20260
Sep 13, 20260
Sep 12, 20260
Sep 11, 20260
Sep 10, 20260
Sep 9, 20260
Sep 8, 20260
Sep 7, 20260
Sep 6, 20260

Shared by 8 plugins in sittari-studio/payload-plugins.

npm weekly downloads

14−30 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 202614
Dec 4, 202615
Dec 3, 202615
Dec 2, 202613
Dec 1, 202613
Nov 30, 202613
Nov 29, 202613
Nov 28, 202612
Nov 27, 202612
Nov 26, 202612
Nov 25, 20264
Nov 24, 20263
Nov 23, 20263
Nov 22, 20264
Nov 21, 20264
Nov 20, 202616
Nov 19, 202618
Nov 18, 202625
Nov 17, 202625
Nov 16, 202625
Nov 15, 202624
Nov 14, 202624
Nov 13, 202612
Nov 12, 202611
Nov 11, 20263
Nov 10, 202611
Nov 9, 202621
Nov 8, 202623
Nov 7, 202623
Nov 6, 202623
Nov 5, 202623
Nov 4, 202627
Nov 3, 202621
Nov 2, 202611
Nov 1, 20268
Oct 31, 20268
Oct 30, 20267
Oct 29, 20266
Oct 28, 20262
Oct 27, 20260
Oct 26, 20261
Oct 25, 20263
Oct 24, 20267
Oct 23, 20267
Oct 22, 202611
Oct 21, 202611
Oct 20, 202617
Oct 19, 202616
Oct 18, 202614
Oct 17, 202614
Oct 16, 202615
Oct 15, 202616
Oct 14, 202616
Oct 13, 202610
Oct 12, 202618
Oct 11, 202620
Oct 10, 202617
Oct 9, 202617
Oct 8, 202614
Oct 7, 202614
Oct 6, 202626
Oct 5, 202618
Oct 4, 202620
Oct 3, 202619
Oct 2, 202620
Oct 1, 202618
Sep 30, 202623
Sep 29, 202613
Sep 28, 202627
Sep 27, 202624
Sep 26, 202630
Sep 25, 202631
Sep 24, 202642
Sep 23, 202648
Sep 22, 202655
Sep 21, 202682
Sep 20, 2026232
Sep 19, 2026226
Sep 18, 2026226
Sep 17, 2026221
Sep 16, 2026221
Sep 15, 2026213
Sep 14, 2026172
Sep 13, 202625
Sep 12, 202625
Sep 11, 202631
Sep 10, 202634
Sep 9, 202630
Sep 8, 202642
Sep 7, 202644
Sep 6, 202644

Each point is npm's rolling 7-day download count.

Health Score

64/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1294311885-pages.svg)](https://payloaddirectory.dev/plugins/1294311885-pages)
HTML
<a href="https://payloaddirectory.dev/plugins/1294311885-pages"><img src="https://payloaddirectory.dev/badge/1294311885-pages.svg" alt="Payload Directory"></a>
Updated Sep 11, 2026Created Jul 8, 2026Published Sep 11, 2026

README

@sittari/payload-pages

A Payload CMS plugin that adds a versioned pages collection with configurable page types, localized fields, drafts, and autosave.

Install

pnpm add @sittari/payload-pages

Basic usage

import { buildConfig } from 'payload';
import {
  createFlexiblePageType,
  createStandardContentPageType,
  pagesPlugin,
} from '@sittari/payload-pages';

export default buildConfig({
  plugins: [
    pagesPlugin({
      pageTypes: {
        standardContent: createStandardContentPageType(),
        flexible: createFlexiblePageType({
          blockSlugs: ['hero', 'content'],
        }),
      },
    }),
  ],
  collections: [],
});

Configuration

pageTypes is required unless the plugin is disabled.

OptionTypeDefaultDescription
enabledbooleantrueSet to false to return the incoming Payload config unchanged.
localizeTitlebooleantrueEnables or disables localization on the default title field.
pageTypesPageTypesRequiredPage-type definitions keyed by the value stored in pageType.
overrides(defaultCollection) => CollectionConfigDefault collectionExtends or replaces the final pages collection configuration. Applied last.

The package root exports createStandardContentPageType and createFlexiblePageType. Their option types and the PagesPluginConfig, PageTypeConfig, and PageTypes types are also available from the package root and from @sittari/payload-pages/types.

pagesPlugin does not create a slug or path field. Use @sittari/payload-permalink after pagesPlugin when the collection needs WordPress-style slugs and permalinks:

import { permalinkPlugin } from '@sittari/payload-permalink';

plugins: [
  pagesPlugin({
    pageTypes: {
      standardContent: createStandardContentPageType(),
    },
  }),
  permalinkPlugin({
    siteUrl: 'https://example.com',
    collections: {
      pages: { prefix: '' },
    },
  }),
];

Enable or disable the plugin

pagesPlugin({
  enabled: false,
});

When disabled, the plugin does not add the pages collection.

Compose page types

pagesPlugin({
  pageTypes: {
    standardContent: createStandardContentPageType(),
    flexible: createFlexiblePageType({
      blockSlugs: ['hero', 'content', 'gallery'],
    }),
    blogIndex: {
      label: 'Blog Index',
      fields: [{ name: 'heading', type: 'text' }],
    },
  },
});

The object key becomes the stored value and group-field name. Its label is used in the page-type selector. The first entry is the default selection.

The built-in factories are optional. Include either, both, or neither of them.

Configure title localization

The default title is localized. Disable localization when the Payload project does not use localized page titles:

pagesPlugin({
  pageTypes: {
    standardContent: createStandardContentPageType(),
  },
  localizeTitle: false,
});

Customize a built-in page type

Factory options shallowly replace the generated page-type properties. This keeps array replacement explicit and avoids deep-merge behavior:

pagesPlugin({
  pageTypes: {
    standardContent: createStandardContentPageType({
      label: 'Article',
      fields: [
        {
          name: 'content',
          type: 'richText',
          localized: false,
          editor: customEditor,
        },
      ],
    }),
  },
});

The flexible factory accepts blockSlugs, which become blockReferences on its blocks field:

createFlexiblePageType({
  blockSlugs: ['hero', 'content', 'gallery'],
});

Override the collection

overrides runs after page types and all default fields have been assembled. Use it for access control, hooks, admin settings, versions, or additional fields:

pagesPlugin({
  pageTypes: {
    standardContent: createStandardContentPageType(),
  },
  overrides: (defaultCollection) => ({
    ...defaultCollection,
    admin: {
      ...defaultCollection.admin,
      defaultColumns: ['title', 'pageType', '_status', 'updatedAt'],
    },
    fields: [
      ...defaultCollection.fields,
      {
        name: 'internalName',
        type: 'text',
      },
    ],
  }),
});

The callback must return a complete Payload CollectionConfig. Spread defaultCollection and nested properties you want to preserve when making partial changes.

Collection defaults

The generated collection has:

  • The slug pages
  • title as the admin display title
  • English, Russian, and Ukrainian collection and field labels
  • Drafts and versions enabled
  • Draft autosave every 375 milliseconds
  • A required title field, localized by default
  • A required pageType select followed by one conditional group per page type

Built-in page-type factories

  • createStandardContentPageType() creates a localized content rich-text field.
  • createFlexiblePageType() creates a blocks field and accepts a blockSlugs option.

The plugin does not add these types automatically. Payload localization must be configured in the consuming project when using the standard-content factory's localized field.

Similar plugins