Core language · Project model
Project information.
Templates, scripts and nift eval can inspect the same read-only semantic view of the current Nift project.
The project value
$[project.name]
$[project.root]
$[project.output]
$[project.mode]
$[project.files.size()] The public boundary contains project facts rather than mutable engine bookkeeping. Project values are ordinary Nift data, so the normal object and collection methods apply.
Tracked files
project.files is deterministic and contains one value per tracked item. File values expose name, title, path, output_path, url, extension and metadata.
$[html := project.files.filter(f => f.extension == ".html")]
$[names := project.files.map(f => f.name)] The same model for agents
nift eval --json 'project.files.size()'
nift eval --json 'project.files.map(f => f.path)' Running project-dependent expressions outside a Nift project fails rather than inventing project state. This keeps the CLI and build-time expression hosts aligned.
Schemas, content and taxonomies
$[(project.schemas).keys()]
$[(project.content.post).map(p => p.title)]
$[(project.taxonomies.tag).map(t => t.name)] Typed content and taxonomy indexes are ordinary project values, so the same collection methods work in templates and nift eval.
RelatedFront matter →