Skip to main content

Structure

Your theme’s structure must contain the following files:

Minimum Required

.
├── archive.html
├── error.html
├── page.html
├── posts-list.html
├── post.html
├── theme.json

Although typically you will also include assets and partial templates in your theme such as:

Typical Structure

.
├── /assets
|   └── /css
|       ├── styles.css
|   ├── /fonts
|   ├── /images
|   ├── /js
├── /partials
|   ├── base.html
|   ├── footer.html
|   ├── header.html
├── archive.html
├── error.html
├── page.html
├── posts-list.html
├── post.html
├── theme.json

Assets Folder

You must place all of your theme’s public assets within a folder named assets. However the file and folder structure within is completely up to you.

theme.json File

Your theme must include a theme.json file. It must be a valid JSON (JavaScript Object Notation) file and includes details about your theme, for example:

{
  "name": "Amazing Coffee Theme",
  "version": "1.1.3",
  "engine": "1.0.0"
}

All attributes are required.

Name Type Description
name str The name of the theme.
version str The version number of theme theme.
engine str The version number of the Typed theme engine to use when rendering.

You can also define additional context variables within the theme.json file that are made available to your theme. For more info see the variables docs.

Excluded Files and Folders

When you upload a ZIP file of your theme some files and folders are excluded and won’t be available to the live version of your theme on Typed. Any file or folder that’s name begins with a dot . or underscore _ will be excluded. Bear this in mind when naming files and folders within your theme.

Development Source Files

As mentioned above, some files and folders will be excluded when you upload a ZIP file of your theme. You should use this to your advantage when working with source files that are to be compiled into your theme’s assets folder, for example SASS or JavaScript files. It is recommended you place your theme’s development source files in a folder that’s name begins with an underscore _, for example _src.

In the following example all files and folder within the _src folder will be excluded as well as the .editorconfig file.

.
├── .editorconfig
├── /_src
|   └── /css
|       ├── styles.scss
├── theme.json