Home Documentation Templates Examples Showcase GitHub
Theme

Content · Discovery

Typed content.

A tracked file with a content type becomes an ordinary read-only Nift value in the project's semantic content index.

Discover content

$[posts := project.content.post]
$[published := posts.filter(p => !p.draft)]
$[titles := posts.map(p => p.title)]

project.content.all contains all typed content. project.content.post selects one type; dynamic object indexing can select a type whose name is computed.

Content values

Schema/front-matter fields are available directly, such as post.title. Intrinsic fields include type, path, output_path, url, content and the raw effective metadata object.

Query without building

nift eval --json '(project.content.post).map(p => p.title)'
nift eval --json '(project.content.post).filter(p => !p.draft)'

The CLI uses the same expression engine and project model as templates. Project-content queries also participate in dependency tracking so content/model changes invalidate dependent outputs.