Content And Data

Statiq Web has a variety of ways of reading, writing, and working with different kinds of content and data.

Content and data files should be placed in the input folder (or a sub-folder). Whether a file is considered content or data is determined by two settings:

  • The ContentFiles setting controls how content files are located and is set to **/{!_,}*.{html,cshtml,md} by default. This loads all .html, .cshtml, and .md files in any input directory unless it starts with an underscore _.
  • The DataFiles setting controls how data files are located and is set to **/{!_,}*.{json,yaml,yml} by default. This loads all .json, .yaml, and .yml files in any input directory unless it starts with an underscore _.

Both content files and data files support functionality like directory metadata files, sidecar files, and front matter. The main difference is that templates like Markdown and Razor are processed for content files whereas data files are parsed as data formats like JSON and YAML and add to the metadata of a document.

Features like archives and feeds also let you work with content and data and produce different kinds of outputs from them.

Child Pages

Content

Content files contain the pages of your site and are processed based on their media type (which is determined by file extension).

Templates

Statiq Web supports multiple template languages (templates) and you can specify which ones should be applied for your site.

Data

In addition to content, Statiq Web has rich support for data files.

Metadata

Metadata lets you add bits of information to documents and control their behavior.

Enumerating Values

Statiq Web has a nifty feature where you can declare a sequence of values to be enumerated within the front matter of a file and it will create additional documents for each of the values.

Archives

Archives are one of the most powerful features of Statiq Web and allow you to group and page content.

Feeds

Feed files let you define RSS, Atom, and/or RDF feeds for any content or data in your site.

Excluding Documents

Documents can be easily excluded from generation, either by removing them entirely or by suppressing their output (but still processing them in the appropriate pipeline).