Velora CMS Developers

Content#

What each route returns, and how the pieces fit a page. Field-level detail is in the API reference.

The site#

/site is everything that renders around the content, in one read per page:

The front page#

/home returns the front page's sections in the order the editor chose in Velora. Render each in turn; change the order in Velora, not in code.

Each section can have a title, a path to link "more" to, and a key: the name the site gave the section, for your front end to place or style it by.

Listings#

/articles lists live articles, newest first. Filter it with:

Parameter Filters by
category Section slugs. Several, comma separated, match any.
tag Tag slugs, comma separated.
type Article types, comma separated: type=news,race.
author A writer's slug.
entity_type + entity Articles about one entity: its type's slug and its own.
detail + value An article detail: detail=Sponsored&value=true. A detail that links to an entity takes the entity's slug.
match all (the default): an article must match every filter. any: it may match any of category, tag and type.

Section, writer and entity pages have their own listing routes, which return the thing and its articles together: /categories/{slug}, /authors/{slug} and /entities/{type_slug}/{slug}.

Article cards (ArticleCard) carry what a list needs: title, path, excerpt, eyebrow, cover, dates, reading_minutes, category, authors, tags and details.

Paging#

Listings page two ways.

By number, for pages a reader visits: page (1 to 500) and limit (1 to 50, 12 by default; entity type indexes take up to 100, 48 by default). The answer has page, pages and total. Give each page a path (Routing).

By cursor, for "load more" and for walking the whole archive. Every /articles answer has next_cursor; pass it back as cursor for the articles after the last one you got. It is null on the last page. An ISO time works as a cursor too: cursor=2019-06-01T00:00:00Z starts with the articles published before then. Cursors go past page 500. A read with a cursor is never cached anywhere, so do not cache it yourself.

An article#

/articles/{slug} returns an ArticleDetail: everything on the card, plus

Details#

Details are a site's own structured fields: a race's date, whether a story is sponsored, the team a rider rides for. Articles and entities both have them.

Entities#

Writers, sections, pages and tags#

/search?q=... finds live articles: words, "quoted phrases" and -excluded words, best match first, paged by page and limit. q is 2 to 200 characters. Search is never cached; render it per request on a route kept for your front end (Velora keeps /search by default).

This page as markdown: https://developers.velora.build/content.md