दस्तावेज़ीकरण अभी केवल अंग्रेज़ी है। बाकी साइट आपकी भाषा का अनुसरण करती है।
Content
Posts, pages, and custom types: create, edit, publish, translate, restrict who can view them, keep working revisions, and recover from the trash.
11 मिनट पढ़ा
Admin → Content lists entries by type. Create from New, edit metadata on /admin/content/:id, and open the visual builder at /admin/content/:id/builder. Dashboard tiles also jump to a new post or page.
Types
`post` and `page` ship as built-in types and cannot be deleted. Admin → Content types (/api/content-types) persists additional slugs and field definitions per site. Field kinds: text, textarea, richtext, number, boolean, media, date, select. Reserved keys seoTitle, seoDescription, seoCanonical, and seoImage belong to built-in SEO — do not reuse them on a custom type.
POST /api/content accepts any registered type slug. Custom fields are stored on the row as JSON and shown in the editor. You cannot delete a built-in type, or a custom type that still has entries.
Each content type has a Cache-Control setting in Admin → Content Types: inherit the site default, never cache, or a validated custom header. A single post or page can override it under Advanced. See Caching.
Content type settings
Content → Content Types lists every type in a table. Opening one shows a two-column editor for its labels, description, cache policy, system fields, and custom fields. Field settings expand in place, fields can be reordered, and you are warned before leaving with unsaved changes. Existing types keep their previous behaviour until you save an override.
| Setting | What it does |
|---|---|
| Label / plural label | The plural label names the type in the overview. |
| Content editor | Automatic (the type or plugin default), the block builder, or custom fields. Existing blocks and fields are kept. Plugins can still choose through content.editor. |
| Dashboard shortcut | Adds a New shortcut to the dashboard. On for posts and pages; other types opt in. |
| Revision history | Captures new restore points. Turning it off keeps old history, working drafts, autosave, version checks, and scheduling. |
| Draft previews | Allows staff previews and shareable preview links, including links already sent. |
| Public search | Inherit the site setting, or always include or exclude the type from site search. Admin search always includes it. |
| SEO metadata and sitemap | Shows the SEO panel, renders its tags, and lists published entries in the sitemap. Turning it off is not noindex and does not restrict access. |
| Comments | Inherit the site default, on by default, or off for the whole type. Off wins over an entry's own setting. |
| Cache-Control | Inherit the site policy or set one for the type. Account and sign-in types never cache. |
Account and sign-in types cannot turn on public search, SEO, or comments. The content-type endpoints accept and return a settings object, stored per site by migration 0050_content_type_settings.
Statuses
The admin API accepts draft, published, archived, and scheduled. Publishing is available to administrators, editors, and authors. Authors can edit their own items; administrators and editors can delete any.
Scheduled publish
scheduled is accepted on PATCH. A job name content.publish-scheduled exists on the jobs package; the CE server does not yet register a cron publisher. Treat scheduled as a status you set, not an automatic go-live clock.
Translations
POST /api/content/:id/translate with { locale } clones the item into a translation group (translation_group_id, per-row locale from migration 0002). List filters: type, status, slug, locale, translationGroupId, limit, cursor. A new translation takes its group's creation date, and when first published its group's publish date, so every language shows the same date in lists, feeds, and on the page (migration 0052_translation_group_dates).
Visibility
From Justflows 0.4.1, published content can be restricted by role, by user, or by a plugin rule. Visibility is separate from editing rights: an administrator browsing the site gets the same answer as anyone else with that role.
- Content type default — Admin → Content Types → the type → Visibility. Administrators only.
- Entry override — the Visibility panel in the editor (needs
content:updateon the entry, recorded in the audit log). It replaces the type default completely, applies to every translation, and takes effect when saved, outside drafts and revisions.
A rule has an audience (everyone, authenticated, or nobody), allow and deny lists for roles and users, and plugin rules. The first matching step wins:
| Order | Step | Result |
|---|---|---|
| 1 | The user is on the deny list | Denied |
| 2 | The user is on the allow list | Allowed |
| 3 | One of the viewer's roles is on the deny list | Denied |
| 4 | A plugin rule in require mode does not allow | Denied |
| 5 | One of the viewer's roles is on the allow list | Allowed |
| 6 | A plugin rule in grant mode allows | Allowed |
| 7 | The audience | Allowed or denied |
Check access in the panel shows whether an anonymous visitor, a role, or a user can view the entry, and which rule decided. A hidden entry answers 404 at every URL and in the public API, and is left out of lists, search and its totals, query blocks, term archives, menus, comment submissions, and GET /api/v1/media. Sitemaps, feeds, static export, and ctx.content.getPublished / listPublished always evaluate as an anonymous visitor. Staff previews and signed preview links still show the entry. account and auth entries keep their own rules.
Visibility hides the entry, not its files
An image or download in a hidden entry stays reachable at its /uploads/... URL for anyone who already has it. Use a plugin's private files (ctx.files) for paid or confidential downloads. A page with a rule is never held by the page cache, a CDN, or a static export; it is sent private, no-store.
Plugins add rule types with ctx.visibility.registerRule (SDK 0.1.8, see Plugins). A rule that is missing, throws, takes longer than a second, or answers badly denies, so turning off a required plugin hides the content it guards. APIs: GET /api/content-visibility/rule-types and GET/PUT /api/content-visibility/content/:id.
Admin API
| Method | Path | Purpose |
|---|---|---|
GET | /api/content | List (session, content roles). |
POST | /api/content | Create (type must be a registered slug). |
GET | /api/content/:id | One item. |
PATCH | /api/content/:id | Update metadata, status, blocks, fields. |
DELETE | /api/content/:id | Delete. |
POST | /api/content/:id/translate | Clone into another locale. |
GET / POST / PATCH / DELETE | /api/content-types | List and manage type definitions (write: administrator). |
Saves invalidate the content: cache prefix. Hooks: content.beforeCreate / beforeUpdate / beforeDelete / beforePublish (gates), then content.created / updated / deleted / published / unpublished (actions). Filters content.input, content.output, and content.render sit on the way in, out, and onto the public HTML.
Revisions and taxonomies
Every content type keeps working revisions. Saving a published item writes a draft without touching the live version — visitors keep seeing what is published until you explicitly publish, which copies the working revision across atomically. The Revisions panel lists the last five published versions and can restore one as a draft; you can preview, compare, and discard drafts. The content list shows “Published — draft changes” while a draft is waiting. Categories, tags, and custom taxonomies are managed under Content → Categories & Tags and assigned in the editor sidebar; see Categories, tags, and taxonomies.
Note
Deleting content moves it to the Trash, where it can be restored with its revisions intact until the retention job purges it.