Project Structure

A Cook project has a simple, conventional layout:

Key directories

src/

Your source files. Every .html and .md file becomes a page:

  • src/about.html → /about/
  • src/blog/my-post.md → /blog/my-post/
  • src/index.html → / (root)

config/

  • main.js — Build configuration (paths, plugins, features)
  • data.js — Global data available in all templates as ${variableName}

src/components/

Reusable HTML component templates. A file named card.html is used as <card> or with a prefix like <site-card>. See Components.

src/includes/

Shared HTML partials included with data-include="/includes/header.html". See Includes.

src/layouts/

Page wrapper templates referenced by data-template="post" or markdown frontmatter layout: post. See Template Strings.

dist/

Generated output. This is what you deploy. Created fresh on each build.

Build-only directories

components/, includes/, and layouts/ are used during the build but are not copied to dist/. Configure this in main.js: