Verniz could not turn an authored Markdown, JSON, TOML, or YAML file into the
metadata struct declared by content.collection. The diagnostic points to the
collection expression and names the content file and field that failed.
For example, this collection requires every post to have a string title, a
valid ISO date, and an optional draft flag:
use std::content
struct PostMeta {
title: str,
date: content.Date,
draft: bool = false,
}
const posts = comptime content.collection(
"posts",
"content/posts/**/*.md",
PostMeta,
)Fix the named frontmatter field, remove fields that are not present in the
struct, or give each document a unique portable slug. Dates accept
YYYY-MM-DD or a complete RFC 3339 timestamp. Static production builds also
reject documents marked draft: true; development keeps them visible for
authoring.
Collection paths use the same two anchors as client entries: ./content/**
starts beside the declaring Zolo file, while content/** starts at the project
root. Backslashes, absolute paths, and paths that escape the project are not
portable and are rejected.
Markdown is sanitized during compilation. Raw authored HTML is removed, and unsafe link/image schemes are reported as TE775 instead of reaching the output.
YAML frontmatter is strict YAML. Escape an apostrophe inside a single-quoted
scalar by doubling it ('Zolo''s strings'); the compiler does not accept or
rewrite permissive YAML-like legacy syntax.
When a collection uses content.ContentTransform, TE775 also rejects a route
callback that does not return a portable root-relative route, malformed alias
maps, fallback entries without a resolved route, and relative .md links that
do not exist in the current or fallback collection. Fix the authored link, add
an explicit portable alias, or provide a transformed base-locale collection as
fallback.
See also: the Content collections section of the Verniz Sites specification.