Home Documentation Templates Examples Showcase GitHub ↗
Theme

Project internals

.nift/config.json.

The project config tells Nift where content lives, where generated files go, which extensions and template are the defaults, and how builds should use threads and detect changes.

A typical web project

{
  "config": {
    "content-dir": "content/",
    "content-ext": ".html",
    "output-dir": "public/",
    "output-ext": ".html",
    "default-template": "templates/template.html",
    "build-threads": -1,
    "incremental-mode": "modified"
  }
}

For a web project, public/ is a useful conventional output directory because many servers, hosts and frameworks already use that name for browser-facing files. Nift does not require the directory to be called public/; it simply uses the value in output-dir.

Fields

FieldMeaning
content-dirBase directory used to derive content paths for tracked names. It must be non-empty.
content-extDefault content-file extension. It must begin with ..
output-dirBase directory used to derive generated output paths. For web projects, public/ is a convenient convention.
output-extDefault output extension. It must begin with ..
default-templateTemplate used by newly tracked items when a different template is not supplied.
build-threadsNumber of build threads. The generated config uses -1, meaning the default based on available cores. A missing/invalid zero value is reset to -1.
incremental-modeHow Nift determines whether dependencies changed: modified, hash, or hybrid.

How tracked names become paths

With this config:

{
  "config": {
    "content-dir": "content/",
    "content-ext": ".html",
    "output-dir": "public/",
    "output-ext": ".html",
    "default-template": "templates/template.html",
    "build-threads": -1,
    "incremental-mode": "modified"
  }
}

a tracked name such as about resolves naturally to:

content/about.html     →     public/about.html

and a nested name:

docs/getting-started

content/docs/getting-started.html
             ↓
public/docs/getting-started.html

The tracked item stores the name/title/template; the project config supplies the default directory and extension rules that turn the name into concrete content and output paths.

Incremental modes

modified

Uses modification information to decide whether inputs have changed. This is the generated default and is fast for everyday development.

hash

Uses content hashes when determining changes.

hybrid

Uses the hybrid mode implemented by Nift, combining its change-detection strategies.

Should you edit it?

Yes, when you want to change project-wide defaults such as moving generated files to public/, changing the default template, or choosing an incremental mode. It is deliberately ordinary JSON so the project setup is inspectable and easy for humans, scripts and AI assistants to understand.

config.json describes the project-wide rules.

tracked.json describes the individual things Nift manages within those rules.