Nanoc»Configuration

text_extensions

A list of file extensions that Nanoc will consider to be textual rather than binary. If an item with an extension not in this list is found, the file will be considered as binary.

text_extensions: [ 'adoc', 'asciidoc', 'atom', 'coffee', 'css', 'erb', 'haml', 'handlebars', 'hb', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'ms', 'mustache', 'php', 'rb', 'rdoc', 'sass', 'scss', 'slim', 'txt', 'xhtml', 'xml' ]

output_dir

The path to the directory where all generated files will be written to. This can be an absolute path starting with a slash, but it can also be a path relative to the site directory.

output_dir: output

index_filenames

A list of index filenames, i.e. names of files that will be served by a web server when a directory is requested. Usually, index files are named “index.html”, but depending on the web server, this may be something else, such as “default.htm”. This list is used by Nanoc to generate pretty URLs.

index_filenames: [ 'index.html' ]

enable_output_diff

Whether or not to generate a diff of the compiled content when compiling a site. The diff will contain the differences between the compiled content before and after the last site compilation.

enable_output_diff: false

prune

The prune section contains options for the prune command, which deletes stray files from the output directory.

prune:
  auto_prune: true
  exclude: [ '.git', '.hg', '.svn', 'CVS' ]

When auto_prune is true, Nanoc will automatically remove files not managed by Nanoc from the output directory.

The exclude option determines which files and directories you want to exclude from pruning. If you version your output directory, you should probably exclude VCS directories such as .git or .hg.

commands_dirs

Directories to read commands from. This is useful when you have a set of commands that you want to share between sites.

commands_dirs: [ '../shared-commands' ]

data_sources

The data sources configuration contains the definition of the data sources of this site. It is a list of hashes with keys described in the sections below; each array element represents a single data source. For example:

data_sources:
  -
    type: pentabarf # a custom data source
    items_root: /conference/

For details, see the Data sources page.

string_pattern_type

Sets the type of string pattern to use. Can be glob or legacy. See the Identifiers and patterns page for details.

string_pattern_type: glob