Directory Structure
By default, cobalt mirrors your source file hierarchy in the destination, helping you get closer to a What-You-See-Is-What-You-Get experience.
Files or folders that help generate the site but aren't directly part of the output
are "hidden" from cobalt by prefixing them with a _
.
The default Cobalt site usually looks like this
.
|- _cobalt.yml
|- _layouts
| |- default.liquid
|- _includes
| |- header.liquid
|- _data
| |- movies.json
|- _sass
| |- base.scss
|- _site
| |- index.html
|- _defaults
| |- pages.md
| |- posts.md
|- posts
| |- cats.md
|- _drafts
| |- dogs.md
|- _syntaxes
| |- language.sublime-syntax
|- index.liquid
File / Directory | Description |
---|---|
. | Root directory for your content. Can be modified in _cobalt.yml . |
_cobalt.yml | Site-wide configuration file |
_layouts | Templates that wrap pages. The layout is chosen in the frontmatter |
_includes | Liquid snippets of content to be shared among layouts or pages. |
_data | Data files in this directory are loaded as part of the {{ site.data }} variable. |
_sass | Sass snippets that can be imported into your .scss files. |
_site | The output directory of cobalt. Can be modified in _cobalt.yml . |
_defaults | cobalt new initializes files from here based on the collection name. |
posts | Pages in this directory will be treated as blog posts. Can be modified in _cobalt.yml . |
_drafts | Pages in this directory will be treated as draft blog posts. Can be modified in _cobalt.yml . |
_syntaxes | Syntax highlighting support will be added for each Sublime Text syntax definition in this directory. |
index.liquid | Any other pages found will be transformed by cobalt. |
Other files | Assets will be copied directly over from the source directory to the output directory. |