The syntax for the track command is:
nift track name (title) (template-path)
nsm track name (title) (template-path)
The track command is for tracking new files to be generated during a build with Nift, title and template-path are optional (default title is the specified name, and default template-path is the project-wide template path specified in the project configuration file .nsm/nift.config). Surround any names, titles and/or paths containing spaces with single or double quotes.
Note: you should not do any of the following with names, titles or paths:
- use tabs;
- use consecutive spaces;
- use both single and double quotes;
- single and double quote the entire string, eg. '"bad idea"'.
Also names cannot contain periods. If you need the output filename to contain periods other than in the extension then use a post-build script to move or copy the built file, or alternatively put everything from the first period onwards in the tracked output extension for the file.
Note: When you track a file, the content file path is \$[contentdir]/\$[name]\$[contentext] and the output file path is \$[outputdir]/\$[name]\$[outputext]. For example, if you have content directory content/, content extension .content, output directory site/ and output extension .html and you track about, then the content file will be located at content/about.content and the output file will be built to site/about.html.
Note: track-dir and track-from-file are much faster for tracking large volumes of files than track.
Example of track being used:
nift track index
nift track about 'about page' 'template/page.template'
nsm track docs/installing
nsm track "John's page"