Sections are special directories governed by a section configuration in seamist.toml. Let's imagine we're creating a blog.
[[section]]
name = "blog"
path = "/blog"
type = "collection"
content_type = "post"
route_pattern = "/blog/{year}/{month}/{slug}"
filename_pattern = "{year}-{month}-{slug}.smx"
sort_by = "created"
sort_direction = "desc"
suppress_default_routes = false
nameA friendly name for the section.
pathThe route path of the directory that should become a section.
typeReserved for future use. Use collection for now.
content_typeReserved for future use. Use post for now.
route_patternRewritten route pattern, if desired. Variables are defined using {braces}. Variables that exist in route_pattern must also exist in the filename_pattern.
filename_patternCombined with route_pattern, this customises a route for a given file. In the example above, we have {year}-{month}-{slug}.smx. Given the route_pattern value,
the route for accessing that file's content would be /blog/{year}/{month}/{slug}
sort_byContent in a section can be sorted by any metadata property.
sort_directionasc or desc for ascending or descending.
suppress_default_routesValid values are true or false. If you have specified a rewritten route pattern, this controls whether the default pattern will remain available in addition to the rewritten route.
To access content in a section, you would use URLs like:
http://seamist.host:9149/api/v1/routes/section?site=<site-name>&route=/blog
This would return something like this:
[
{
"route": "/blog/2026/06/25-welcome",
"title": "Welcome!",
"description": "Description of content",
"createdAt": "2026-06-27T04:02:40.1264545+01:00",
"modifiedAt": "2026-06-27T04:02:40.1264545+01:00"
}
]
You would then have to make an additional call to obtain the full content if needed.