Hosting with 20% off when you buy through the link

Content types

Collections that grow — posts, cases, services, team members: shared fields, one address per entry, drafts, a listing page and an order you can drag.

A content type is a collection of entries that share the same fields: blog posts, cases, services, team members, testimonials. You describe the type once; the client then creates as many entries as needed without calling you. Every entry comes with a title, an address (the slug) and a publish date; every other field is one you name. Use a content type when the answer to “will the client want to add another one of these alone?” is yes.

Ask the AI

Create two content types for Norte Studio, a branding studio. Article (plural Blog, address /blog): a subtitle, a cover image, reading time in minutes and the text with formatting. Case (plural Cases, address /cases): client, summary, an image gallery and a list of results, each with a metric and a value. Also create the Blog and Cases pages that list them, newest first. No categories yet.

Give the plural and the address: without them the AI guesses, often in English. The listing pages are part of the request because Velk doesn't create them on its own.

What the AI does

It declares each type in site.json: the plural name shown in the panel's menu, the singular used on the New button, the address prefix and the fields. It writes the template of a single entry and, for each listing, a regular page whose template lists the entries. Then it validates the file and checks the type in the panel.

What the AI runs
$ ./bin/velk schema:validate ✓ site.json is valid. # the listing pages are regular pages $ ./bin/velk page:sync ✓ Pages synced. Created: 2, updated: 0. # lists the content types the site now has $ ./bin/velk item:types

The listing is a page

Entries live at addresses like /blog/entry-address, but /blog itself doesn't appear when the type is created: Velk has no automatic listing for a content type. The list is an ordinary page whose template shows the entries. It takes one step more and gives full control over the list — how many entries, from which category, in what order, with what text above it. Categories work the other way: their archive pages are automatic (see Categories and tags).

In the panel

Each type gets its own link under Content in the side menu, with the number of entries. Its list has search, a Published and Drafts filter, and bulk delete. A new entry is saved with Create, which publishes it, or with Save draft; later, the Status menu switches it between the two.

  • A draft doesn't show on the site.
  • The first time an entry is published, Velk records the date; publishing it again keeps that date.
  • By default the site lists entries newest first by that date. There is no scheduled publishing: an entry goes live when it's published.

An order you drag

Newest first suits a blog, not a team page, a product grid or an FAQ. Ask for a manual order (manual_order, since v3.7.5) and the type's list in the panel gets a drag handle: the client drags the entries into the order the site shows. Turning it on doesn't reshuffle anything — the first time the list opens, the current order is kept and dragging starts from there.

Two limits. The panel shows 50 entries per page, and an entry moves only within its page. And a template that asks for its own order (by title, say) keeps it: if dragging seems to do nothing, that's why — ask the AI to remove that order.

Ask the AI

Add a Team content type to the site of Ponto, a marketing agency: name, role, photo and a short bio, in an order we set by hand in the panel. Team members don't need pages of their own: they only appear on the About page.

The AI turns on the manual order and declares the type without pages of its own. The members exist in the panel and show wherever the theme lists them.

Types without a page of their own

Some collections never open at an address of their own: testimonials, team members, client logos, FAQ entries. A type declared with has_page: false keeps its entries in the panel and shows them where the theme lists them — on the home, on About. Those entries have no address and no SEO section, and they stay out of the sitemap, the list of addresses offered to search engines.

Alternate layouts per entry

A type can offer more than one layout for its entries: a standard case and a featured case that opens with a full-width cover. The AI lists the layouts in templates, the standard one among them, and the editor gets a Template menu where each entry picks its layout. Each layout can also have fields of its own; the editor then picks the layout first, saves, and that layout's fields appear.

Nested types

For content organized in levels, like a manual with chapters and sections or courses with modules, a type can be hierarchical. The editor gets a Parent item menu, and the address follows the levels, like /docs/guide/install. An address only has to be unique among entries with the same parent.

Common questions

Can I preview a draft before publishing it?

Yes. While you're logged in to the panel, a draft opens at its address; for visitors, that address is a page not found.

How do I add categories to a type?

Ask for a taxonomy — a set of categories or tags — attached to the type. The editor gets a category picker, and each category gets an automatic archive page (see Categories and tags).