Note: Make sure all scripts/programs have executable permissions, otherwise Nift will be unable to run them and should throw a build error.
The script extension for website-wide scripts/programs is specified with
Note: Build scripts/programs are moved to the project root directory to run and by default have a backup copy made. If scripts/programs are so large that copying the file will take time, the site configuration file
Alternatively one can write scripts/programs that are run manually (not using Nift) which themselves add the Nift build process, leaving just one program that needs to be run when building.
Website-wide scripts/programs should reside in the project root directory in a file to be named as follows:
pre-build.scriptExt post-build.scriptExt pre-build-auto.scriptExt post-build-auto.scriptExt
It should be reasonably self-explanatory what each will do, though note the pre-build and post-build scripts/programs are run before or after each of the Nift commands
Page specific scripts/programs should reside in the same directory as the content file for the page in a file to be named as follows:
Note: Running lots of page-specific pre/post build scripts/programs does not scale well to hundreds of thousands of scripts/programs. If working on projects that large you might have more luck calling one site-wide build script/program with multithreading.
Note: Scripts/programs are run from the project root directory, so all paths in scripts/programs should be starting from that location. Also do not change directory scripts/programs as it will mess up the other threads that are also running scripts/programs and/or building pages. If one really must change directories in scripts/programs then set the number of build threads to