myst.json

myst.json is the setting file for your project. It is like package.json for node.js project.

Minimal myst.json may be in a following form:

{
  "outDir": "./out",      // output directory.
  "rootDir": "./src",     // directory that contains template files.
  "data": "./data",       // directory that contains data files.
  "dependency": ["./templates"]      // dependencies other than src and data.
}

All paths (outDir, rootDir, etc) are relative to the myst.json. Also absolute paths are accepted.

outDir

The directory where rendered files are located. This field is mandatory.

rootDir

The directory where all the files to be rendered are placed. Defaults to the directory where myst.json is located.

Each file in rootDir is handled by renderers.

outExt

The extension of rendered HTML files. Defaults to .html.

data

The directory that contains data files. See Data.

cache

Name of the cache file. When this field is set, the data loaded from data directory is cached into a single file. Caches may reduce file system access. See Caches.

dependency

The other files or directories that may affect render results. For example, template files referred from render targets.

This field accepts both string and array of string. It has meaning only in watch mode.

target

Files in rootDir to be rendered. Node that it is relative to myst.json, not rootDir.

This field accepts a string and an array of strings. Globs can be used for this field. Defaults to $rootDir/**/*, so by default myst attempts to render all the files in rootDir.

extension

Extension scripts. Both string and array of strings are accepted. See Extensions for details.

server

Settings for the server mode.