Guides Format Reference
This page describes the structure, naming rules, and JSON fields used to create Codio Guides.
It is written for both of these workflows:
authoring guides with AI assistance
generating guide files programmatically outside Codio
In both cases, the output is the same: a normal guide definition stored in the project filesystem.
Caution
We might change these settings from time to time. Use them at your own risk.
Guide structure
A Codio Guide is defined inside the .guides directory.
The standard structure is:
.guides/
├── content/
│ ├── index.json
│ ├── <page-stem>.json
│ ├── <page-stem>.md
│ ├── <container-stem>/
│ │ ├── index.json
│ │ ├── index.md
│ │ ├── <child-page-stem>.json
│ │ ├── <child-page-stem>.md
│ │ └── <child-container-stem>/
│ │ ├── index.json
│ │ └── ...
├── assessments/
│ └── <assessment files>
├── img/
│ └── <image assets>
└── secure/
└── <hidden files>
<project files at repository root>
The key directories are:
Important notes
Images used by guide content should be stored in
.guides/img/.When embedding images in Markdown, reference them from the project root, for example
.guides/img/img1.png. Do not use relative paths such as../img/img1.png.Other files opened by the guide, such as
.pyfiles or project assets, should live at the project root or in normal project folders outside.guides.Assessment definitions live in
.guides/assessments/and are separate from normal guide content pages.Files that must remain hidden from students can be stored in
.guides/secure/.A guide can contain only pages, or it can also include sections, chapters, or both.
Chapters and sections are fully optional organizational containers.
Sections are not limited to chapters. They are organizational containers and can be used wherever they help structure content.
Content model
Codio Guides use three content item types:
pagesectionchapter
These types serve different roles:
Pages are stored as paired .json and .md files.
Sections and chapters are stored as folders with an index.json file and, optionally, an index.md file.
In other words, chapters and sections are entirely optional, and when they are used, they do not need to contain their own Markdown content unless you want them to display content directly.
Naming conventions
Use readable file and folder names with a short unique suffix.
Recommended pattern:
page files:
intro-to-loops-a1b2.jsonandintro-to-loops-a1b2.mdsection folders:
python-basics-c3d4/chapter folders:
getting-started-e5f6/
This convention makes the guide easier to read and keeps item names unique.
Why the suffix matters
Every content item should have a stable stem that is both human-readable and unique. The short suffix at the end helps avoid collisions when two items have similar titles.
The same stem is used in three places:
the file or folder name
the parent
orderarraythe paired Markdown and JSON filenames for pages
For example:
page metadata:
intro-to-loops-a1b2.jsonpage content:
intro-to-loops-a1b2.mdparent order entry:
"intro-to-loops-a1b2"
If you rename a page, section, or chapter, update every parent order entry that references it.
Recommended naming rules
use lowercase letters and hyphens for the readable part
keep the suffix short and stable
use the same stem for both the
.jsonand.mdpage filesavoid spaces in file and folder names
make stems descriptive enough to remain readable in
orderarrays
Root guide file
The root configuration file is .guides/content/index.json.
Example:
{
"title": "my-guide",
"theme": "light",
"scripts": [],
"suppressPageNumbering": true,
"useSubmitButtons": true,
"useMarkAsComplete": true,
"hideMenu": false,
"allowGuideClose": false,
"collapsedOnStart": false,
"hideSectionsToggle": false,
"hideBackToDashboard": false,
"protectLayout": false,
"order": [
"intro-a1b2",
"python-basics-c3d4",
"assessment-e5f6"
]
}
Pages
A page is defined by two files with the same stem:
<page-stem>.json<page-stem>.md
The JSON file defines metadata and workspace behavior. The Markdown file contains the visible page content.
Example page JSON:
{
"id": "91173adf-f264-7e53-aada-aaf497a54450",
"title": "New Page",
"files": [
{
"path": "example.py",
"panel": 0,
"action": "open"
}
],
"layout": "2-panels-tree",
"path": [],
"type": "page",
"contentType": "markdown",
"teacherOnly": false,
"closeTerminalSession": true,
"learningObjectives": ""
}
Sections and chapters
Sections and chapters are directory-based content items.
They are optional. You can build a guide using only pages, or introduce sections, chapters, or both when they improve organization.
A section or chapter folder contains:
index.jsonoptionally,
index.mdchild pages, child sections, or both
Minimal example:
{
"id": "5d58b1fa-8496-6737-42b8-79b1ea87db57",
"type": "section",
"title": "Section",
"order": [
"intro-to-loops-a1b2"
]
}
Extended example:
{
"id": "fae10178-28cf-9d65-7308-ef99c43efb27",
"type": "chapter",
"title": "Another Chapter",
"order": [
"another-section-c3d4"
],
"files": [
{
"path": "#tabs",
"action": "close"
}
],
"layout": "1-panel",
"path": [],
"contentType": "markdown",
"teacherOnly": false,
"closeTerminalSession": true,
"learningObjectives": ""
}
By default, sections and chapters are often used as organizational containers only. In that case, an index.md file is not required.
Layout options
The following layout values are some of the available options in the current format:
Files actions
The files array controls workspace state when an item opens.
Example:
"files": [
{
"path": "#tabs",
"action": "close"
},
{
"path": "anotherfile.py",
"panel": 0,
"action": "open"
},
{
"path": "example.py",
"panel": 2,
"action": "open"
},
{
"path": "#terminal: python example.py",
"panel": 3,
"action": "open"
}
]
Special path values
The following path patterns are supported in the current format:
Markdown content
Guide content is authored in Markdown. For more information see Content Editing.
For pages, the Markdown content lives in the paired <page-stem>.md file.
For sections and chapters, Markdown content can live in index.md inside the item folder. This is optional.
Programmatic generation
Codio Guides can be generated outside Codio as long as the filesystem structure and JSON conventions are respected.
This makes it possible to:
generate guides from templates
build guides from structured data
use AI to draft content and metadata
store guides in version control and update them through automation
When generating guides programmatically:
keep stems stable and unique
make sure every
orderentry matches a real file or folder stemgenerate both the
.jsonand.mdfile for every pageplace images in
.guides/img/reference embedded images from the project root, for example
.guides/img/img1.pngplace assessment files in
.guides/assessments/place secure or hidden resources in
.guides/secure/when appropriateplace workspace files outside
.guidesin the normal project structureuse
contentType: "markdown"andtheme: "light"as fixed values
Minimal examples
Single page at the root level:
.guides/content/
├── index.json
├── intro-a1b2.json
└── intro-a1b2.md
Section used as an organizational container:
.guides/content/
├── index.json
└── python-basics-c3d4/
├── index.json
├── variables-e5f6.json
└── variables-e5f6.md
Chapter containing a section and page:
.guides/content/
├── index.json
└── getting-started-g7h8/
├── index.json
├── index.md
└── setup-i9j0/
├── index.json
├── first-run-k1l2.json
└── first-run-k1l2.md