Skip to content

Configuration Options

Chris Diana edited this page Dec 11, 2018 · 1 revision

List of configuration options:

Option Type Description
elementId string ID of element to attach CMS.js to
mode string Mode 'GITHUB' for Github Pages, 'SERVER' for Self Hosted. Defaults to Server mode if not specified.
github object If Github mode is set, your Github username, repo name, and branch to get files from.
layoutDirectory string The name of the layouts directory.
errorLayout string The error layout template name.
defaultView string The URL that will be the default view that will initially load. For example, this could a list view or a could be a specific view like a single page.
types array These are the types of content to load. Each type name is a directory or folder where the files, pages or posts are located. Each type has a list and single layout template that will determine how the file will be rendered.
plugins array Pass in any custom functions or plugins here and access the CMS object.
markdownEngine function Customize the markdown engine here. For example, if you choose to use the Marked library just specify the marked function.
onload function This function will be called once the CMS instance is loaded and ready.
onroute function This function will be call when the CMS instance changes routes.
debug boolean Toggle debugging.
Clone this wiki locally