LESSON.md
LESSON.md is an open standard created by Slate eLearning for writing eLearning lessons in Markdown. Like README.md or CLAUDE.md, it defines a convention that any tool can read and write. Author a lesson in any text editor or AI tool, then import the .md file directly into Slate.
The specification, template, and import are freely available on all Slate plans.
Why LESSON.md
Section titled “Why LESSON.md”eLearning content is typically locked inside proprietary authoring tools. LESSON.md is a plain-text alternative:
- Any AI tool can write it - Give the template to Claude, ChatGPT, or any LLM and get back a fully structured lesson
- Any editor can open it - VS Code, Obsidian, Notion, Google Docs, or a plain text editor
- Nothing is lost on import - The format maps directly to Slate’s block types
- Human-readable by default - Markdown is easy to review, diff, and version control
Quick start
Section titled “Quick start”- Download the LESSON.md template from the import dialog in Slate (Course Overview → LESSON.md → Download LESSON.md)
- Open the file in your preferred AI tool or text editor
- Fill in the title and add blocks using the
:::fence syntax - In Slate, open a course and click LESSON.md on any section
- Drop your file and click Import Lesson
Format overview
Section titled “Format overview”A LESSON.md file has three parts:
---title: My Lesson Title ← YAML frontmatter---
::: text ← Block fence (opening)# WelcomeThis is a text block.::: ← Block fence (closing)
::: image ← Another blocksrc: https://example.com/photo.jpgalt: A description:::Frontmatter
Section titled “Frontmatter”Every file starts with YAML frontmatter containing the lesson title:
---title: Workplace Safety Basics---The title becomes the lesson name in Slate. Quoted titles are also accepted: title: "My Title".
Block fences
Section titled “Block fences”Each block is wrapped in ::: blocktype and ::: delimiters. This is the fenced directive syntax used by remark-directive, VuePress, and Docusaurus - most AI tools recognize it.
::: textYour content here.:::Properties
Section titled “Properties”Block properties use key: value syntax, one per line, at the top of the block body:
::: imagesrc: https://example.com/photo.jpgalt: Workers wearing hard hatscaption: Always wear appropriate PPEwidth: largealign: center:::Text content
Section titled “Text content”Text inside blocks is standard Markdown. It gets converted to HTML on import:
::: text# Section Heading
This paragraph has **bold**, *italic*, and [links](https://example.com).
- Bullet one- Bullet two
1. Numbered item2. Another item:::Heading levels: In Slate, H1 is reserved for the course title and H2 for lesson titles. Markdown headings are automatically shifted by two levels on import: # becomes H3, ## becomes H4, and so on. Write your headings naturally - the parser handles the conversion.
Nested sections
Section titled “Nested sections”Blocks that contain sub-items (accordion, tabs, layout, card carousel) use ## headings to delimit each section:
::: accordion## First SectionContent for section one.
## Second SectionContent for section two.:::Comments
Section titled “Comments”HTML comments are stripped during import. The template uses them extensively to annotate examples:
<!-- This comment won't appear in the imported lesson -->Block reference
Section titled “Block reference”LESSON.md supports 18 of Slate’s 19 block types. The labeled graphic block is excluded because interactive hotspot positioning can’t be expressed in Markdown.
Rich text content with full Markdown support.
::: text# Heading
Paragraph with **bold**, *italic*, and [links](https://example.com).
- List items work- As do numbered lists:::No properties - the entire block body is Markdown content.
| Property | Required | Values | Default |
|---|---|---|---|
src | Yes | URL | — |
alt | No | Text | "" |
caption | No | Text | — |
width | No | full, large, medium, small | large |
align | No | left, center, right | center |
::: imagesrc: https://example.com/safety-gear.jpgalt: Worker wearing protective equipmentcaption: Always wear appropriate PPEwidth: largealign: center:::| Property | Required | Values | Default |
|---|---|---|---|
src | Yes | URL | — |
provider | No | youtube, vimeo, googledrive, synthesia, loom, url, upload | Auto-detected from URL |
caption | No | Text | — |
::: videosrc: https://www.youtube.com/watch?v=dQw4w9WgXcQcaption: Training overview video:::The provider is auto-detected from the URL. YouTube, Vimeo, Google Drive, Synthesia, and Loom URLs are recognized automatically.
| Property | Required | Values | Default |
|---|---|---|---|
src | Yes | URL | — |
caption | No | Text | — |
::: audiosrc: https://example.com/podcast-episode.mp3caption: Listen to the full interview:::Document
Section titled “Document”| Property | Required | Values | Default |
|---|---|---|---|
src | Yes | URL | — |
filename | No | Text | Extracted from URL |
title | No | Text | "" |
description | No | Text | "" |
A downloadable file attachment. The src must be a URL to a hosted file. The filename is extracted from the URL if not provided, and the file type is detected from the extension.
::: documentsrc: https://example.com/safety-manual.pdffilename: Safety Manual.pdftitle: Workplace Safety Manualdescription: Complete guide to workplace safety procedures:::Divider
Section titled “Divider”| Property | Required | Values | Default |
|---|---|---|---|
style | No | line, space, dots | line |
::: dividerstyle: dots:::Button
Section titled “Button”| Property | Required | Values | Default |
|---|---|---|---|
text | No | Text | Click me |
url | No | URL | "" |
style | No | primary, secondary, outline | primary |
openInNewTab | No | true, false | false |
align | No | left, center, right | — |
::: buttontext: Download Resourcesurl: https://example.com/resources.pdfstyle: primaryopenInNewTab: truealign: center:::Embed (iframe)
Section titled “Embed (iframe)”| Property | Required | Values | Default |
|---|---|---|---|
src | Yes | URL | — |
width | No | CSS value | 100% |
height | No | CSS value | 400 |
title | No | Text | "" |
allowFullscreen | No | true, false | true |
::: iframesrc: https://www.canva.com/design/embed/abc123width: 100%height: 600title: Interactive presentationallowFullscreen: true:::Accordion
Section titled “Accordion”| Property | Required | Values | Default |
|---|---|---|---|
allowMultiple | No | true, false | false |
Each ## heading creates a collapsible section. Content within each section is Markdown.
::: accordionallowMultiple: false
## Fire SafetyFire safety involves understanding exit routes and extinguisher locations.
Always know your nearest **two exits**.
## Electrical SafetyNever work on live circuits without proper lockout/tagout procedures.
- De-energize equipment first- Apply locks and tags- Verify zero energy state
## Chemical SafetyHandle hazardous materials according to their Safety Data Sheets (SDS).:::| Property | Required | Values | Default |
|---|---|---|---|
orientation | No | horizontal, vertical | horizontal |
Each ## heading creates a tab. The heading text becomes the tab label.
::: tabsorientation: horizontal
## OverviewThis module covers the fundamentals of workplace safety.
## ObjectivesBy the end of this lesson, you will be able to:- Identify common hazards- Use protective equipment correctly
## Resources- [OSHA Guidelines](https://osha.gov)- [Company Safety Manual](https://example.com/safety):::Layout
Section titled “Layout”| Property | Required | Values | Default |
|---|---|---|---|
preset | No | 2-col-equal, 2-col-left, 2-col-right, 3-col-equal, 4-col-equal | Auto from column count |
gap | No | none, sm, md, lg | md |
Each ## heading creates a column. Content within each column is converted to text blocks.
::: layoutpreset: 2-col-equalgap: md
## Left ColumnContent for the **left column** with Markdown support.
## Right ColumnContent for the **right column**.
- List items work here too:::Knowledge Check - Multiple Choice
Section titled “Knowledge Check - Multiple Choice”| Property | Required | Values | Default |
|---|---|---|---|
type | Yes | multiple-choice | — |
question | Yes | Text | — |
correct-feedback | No | Text | Correct! |
incorrect-feedback | No | Text | Try again. |
Use [x] for the correct answer and [ ] for incorrect options. Multiple choice must have exactly one correct answer and at least two options.
::: knowledge-checktype: multiple-choicequestion: What should you do first when you discover a fire?correct-feedback: Correct! Always activate the alarm first.incorrect-feedback: Review the fire response procedures and try again.
- [ ] Attempt to extinguish it- [x] Activate the fire alarm- [ ] Open the windows- [ ] Continue working:::Knowledge Check - Multiple Select
Section titled “Knowledge Check - Multiple Select”Same properties as multiple choice. Use [x] on all correct answers. At least one must be correct.
::: knowledge-checktype: multiple-selectquestion: Which of the following are types of PPE? (Select all that apply)correct-feedback: Correct! All of these are PPE.incorrect-feedback: Some items are missing. Review the PPE categories.
- [x] Safety goggles- [x] Hard hat- [ ] Laptop- [x] Steel-toed boots- [ ] Notebook:::Knowledge Check - Fill in the Blank
Section titled “Knowledge Check - Fill in the Blank”| Property | Required | Values | Default |
|---|---|---|---|
type | Yes | fill-in-the-blank | — |
question | Yes | Text | — |
correct-feedback | No | Text | Correct! |
incorrect-feedback | No | Text | Try again. |
caseSensitive | No | true, false | false |
List all accepted answers with [x]. At least one accepted answer is required.
::: knowledge-checktype: fill-in-the-blankquestion: The chemical symbol for water is _____.correct-feedback: Correct! Water is H2O.incorrect-feedback: Think about hydrogen and oxygen.
- [x] H2O- [x] h2o:::| Property | Required | Values | Default |
|---|---|---|---|
headerRow | No | true, false | true |
headerColumn | No | true, false | false |
borderStyle | No | all, horizontal, outer, none | all |
striping | No | none, even, odd | none |
caption | No | Text | — |
Use standard Markdown pipe table syntax. The separator row (| --- | --- |) is required between the header and data rows.
::: tableheaderRow: trueborderStyle: allstriping: evencaption: PPE requirements by area
| Area | Hard Hat | Goggles | Gloves || ----------- | -------- | ------- | ------ || Warehouse | Yes | No | Yes || Laboratory | No | Yes | Yes || Office | No | No | No || Loading Bay | Yes | No | Yes |:::| Property | Required | Values | Default |
|---|---|---|---|
mode | No | html, snippet, blocks | html |
html | No | HTML string | "" |
css | No | CSS string | "" |
js | No | JavaScript string | "" |
useJquery | No | true, false | false |
::: codemode: htmlhtml: <div class="alert"><strong>Notice:</strong> This area requires PPE.</div>css: .alert { padding: 16px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px; }:::For complex HTML/CSS/JS, consider using Slate’s code block editor directly - the inline property format is limited to single-line values.
| Property | Required | Values | Default |
|---|---|---|---|
title | No | Text | "" |
subtitle | No | Text | "" |
style | No | default, outlined, elevated, filled | default |
imageUrl | No | URL | "" |
imageAlt | No | Text | "" |
imagePosition | No | top, left, right, none | top if image, none otherwise |
linkUrl | No | URL | "" |
linkNewTab | No | true, false | false |
Markdown content after the properties becomes the card body.
::: cardtitle: Fire Extinguisher Typessubtitle: Know which to usestyle: elevatedimageUrl: https://example.com/extinguishers.jpgimageAlt: Different types of fire extinguishers
- **Class A** — Ordinary combustibles (wood, paper)- **Class B** — Flammable liquids (gasoline, oil)- **Class C** — Electrical equipment:::Flip Card
Section titled “Flip Card”| Property | Required | Values | Default |
|---|---|---|---|
flipDirection | No | horizontal, vertical | horizontal |
flipTrigger | No | hover, click | click |
aspectRatio | No | 1:1, 4:3, 16:9, auto | 4:3 |
Use ## Front and ## Back headings. Each side supports its own properties (title, subtitle, imageUrl, imageAlt, style) followed by Markdown content.
::: flip-cardflipDirection: horizontalflipTrigger: clickaspectRatio: 4:3
## Fronttitle: What does PASS stand for?subtitle: Click to reveal
A common acronym for fire extinguisher use.
## Backtitle: PASSsubtitle: Fire extinguisher technique
- **P**ull the pin- **A**im at the base of the fire- **S**queeze the handle- **S**weep side to side:::Card Carousel
Section titled “Card Carousel”| Property | Required | Values | Default |
|---|---|---|---|
style | No | default, outlined, elevated, filled | default |
cardsPerView | No | 1, 2, 3, 4 | 3 |
showNavigation | No | true, false | true |
showDots | No | true, false | true |
autoplay | No | true, false | false |
autoplayInterval | No | Milliseconds | 5000 |
loop | No | true, false | true |
Each ## heading creates a card. Cards support their own properties (subtitle, imageUrl, imageAlt, linkUrl, linkNewTab) followed by Markdown body content.
::: card-carouselstyle: outlinedcardsPerView: 3showNavigation: trueshowDots: true
## Hard Hatsubtitle: Head protectionimageUrl: https://example.com/hard-hat.jpgimageAlt: Yellow hard hat
Protects against falling objects and head impacts.
## Safety Gogglessubtitle: Eye protectionimageUrl: https://example.com/goggles.jpgimageAlt: Safety goggles
Shields eyes from chemical splashes and debris.
## Glovessubtitle: Hand protectionimageUrl: https://example.com/gloves.jpgimageAlt: Work gloves
Prevents cuts, burns, and chemical exposure.:::| Property | Required | Values | Default |
|---|---|---|---|
variant | No | 1 (accent), 2 (bordered), 3 (filled), 4 (minimal) | 1 |
A callout block for highlighting important information. The content is Markdown.
::: notevariant: 2
**Important:** Always wear protective equipment in the warehouse area.:::Error handling
Section titled “Error handling”The parser validates your file and reports issues in two categories:
Errors (prevent import):
- Missing title in frontmatter
- No blocks found
- Unclosed
:::fence - Knowledge check with fewer than 2 options
- Fill-in-the-blank with no accepted answers
Warnings (block is skipped or created with defaults):
- Unknown block type
- Missing required property (e.g., image without
src) - Multiple-choice question with more than one correct answer
The import dialog shows all warnings before you confirm the import.
Tips for AI tools
Section titled “Tips for AI tools”When using LESSON.md with an AI assistant, these prompts work well:
Starting from scratch:
Here is a LESSON.md template. Create a lesson about [topic] for [audience]. Use a variety of block types including text, images, knowledge checks, and accordions.
From existing content:
Convert the following content into LESSON.md format. Use knowledge checks to test comprehension and accordions to organize detailed sections. Here is the template for reference: [paste template]
Iterating:
Add a multiple-select knowledge check after the safety procedures section. Include 5 options with 3 correct answers.
Best practices
Section titled “Best practices”- Provide the template - Always include the LESSON.md template or a link to this specification so the AI knows the exact syntax
- Specify block types - Ask for specific block types rather than letting the AI choose generically
- Review before importing - AI-generated content should be reviewed for accuracy before importing
- Use comments - Ask the AI to include HTML comments explaining its choices, since they’re stripped on import