Building Your Own Carpentries Lesson
Last updated on 2026-06-29 | Edit this page
Estimated time: 75 minutes
Overview
Questions
- What is Markdown and how do I use it to write lesson content?
- How do I create a Carpentries-style lesson website using the Workbench template?
- How do I add and organize episodes in my lesson?
- How do I work on my lesson locally using GitHub Desktop?
Objectives
- Write formatted text, headings, lists, links, and images using Markdown
- Create a Carpentries lesson repository from the official template
- Clone the repository locally using GitHub Desktop
- Add episodes and configure the lesson structure
- Understand the Carpentries Workbench file layout
Introduction
This morning you designed a geospatial teaching module — you identified a spatial problem, the data it requires, and where to find that data. Now you will build it as a Carpentries-style lesson website, hosted for free on GitHub Pages.
We will start with Markdown basics (the language Carpentries lessons are written in), then walk through creating and customizing a lesson repository.
Prerequisites:
- A free GitHub account
- A web browser
- GitHub Desktop installed
Part 1: Markdown Basics
All Carpentries lesson content is written in Markdown — a lightweight text format that converts to HTML automatically. You do not need to know HTML. Markdown is designed to be readable as plain text and simple to learn.
Headings
Use headings to structure your episodes into sections. In Carpentries
lessons, ## is the standard section heading.
Links and Images
MARKDOWN
[Link text](https://example.com)

Note: The image has to be in the same folder where your episodes/modules exist. More on the episodes folder below.
Carpentries-Specific Blocks
The Carpentries Workbench adds special fenced blocks for pedagogical elements:
MARKDOWN
::::::::::::::::::::::::::::::::::::: callout
### Tip
This is a callout box for important notes or tips.
::::::::::::::::::::::::::::::::::::::::::::::::
MARKDOWN
:::::::::::::::::::::::::::::::::::: challenge
### Exercise Title
Write the exercise prompt here.
::::::::::::::::::::::::::::::::::::::::::::::::
MARKDOWN
::::::::::::::::::::::::::::::::::::: keypoints
- First key takeaway
- Second key takeaway
::::::::::::::::::::::::::::::::::::::::::::::::
Other available block types include questions,
objectives, discussion, and
solution.
Quick Reference
For a full Markdown guide, see markdownguide.org. For Carpentries-specific formatting, see the Workbench documentation.
Part 2: Create Your Lesson Repository
The Carpentries provides an official template called the Workbench that generates a professional lesson website automatically from your Markdown files. You do not need to write any HTML or CSS.
Step 1: Use the Template
Important: Do not fork the repository — use GitHub’s “Use this template” feature instead.
Go to the Carpentries Workbench template: https://github.com/carpentries/workbench-template-md
Click the green Use this template button (top right) → Create a new repository
-
Fill in the details:
- Owner: your GitHub username or organization
-
Repository name: use the Carpentries naming
convention —
YYYY-MM-DD-sitename-topicname(e.g.,2026-06-30-purdue-geospatial) - Keep Include all the branches on
- Visibility: Public (required for GitHub Pages to work)
Click Create repository
Your lesson website will be built automatically and available at:
https://yourusername.github.io/your-repo-name/
In this case:
-
yourusername- This is your GitHub username. -
your-repo-name- This is your repo name. From the example above 2026-06-30-purdue-geospatial.
It may take a couple of minutes for the first build to complete.
Tip
If you forget the naming convention, your site will still work — but
using the YYYY-MM-DD-sitename format helps The Carpentries
community index and discover your workshop.
Part 3: Work Locally with GitHub Desktop
Editing files directly on GitHub works for small changes, but for building a full lesson it is much easier to work locally on your computer. GitHub Desktop lets you do this without using the command line.
Step 1: Clone Your Repository
- Open GitHub Desktop and log in with your GitHub account.
- Click File → Clone Repository.
- Find the lesson repository you just created and choose a local path (e.g., your Desktop).
- Click Clone.
You now have a local folder with all the lesson files. Any changes you make to files in this folder will appear in GitHub Desktop.
Step 2: Edit, Commit, and Push
The workflow is:
- Edit files in your local folder using any text editor (VS Code, Notepad++, or even plain Notepad)
- Save the files
- Open GitHub Desktop — you will see your changes listed
- Write a short summary describing what you changed (this is required)
- Click Commit to main
- Click Push origin in the top right to send your changes to GitHub
Your lesson website will rebuild automatically after each push.
Part 4: Understanding the Lesson Structure
Your cloned folder contains several important files and folders:
your-lesson/
├── config.yaml ← lesson title, description, episode order
├── episodes/
│ └── introduction.md ← your first episode (lesson page)
├── instructors/ ← instructor-only notes
├── learners/
│ └── setup.md ← setup instructions for students
└── profiles/ ← learner profiles
The config.yaml File
This file controls your lesson’s title, description, and the order in
which episodes appear. Open it in a text editor and look for the
episodes section (around line 67):
To add more episodes, list them here in the order you want them to appear:
Part 5: Add Your First Episode
Now you will turn the geospatial module you designed this morning into a Carpentries episode.
Step 1: Create the File
In your local episodes/ folder, create a new file with a
descriptive name (e.g., urban-heat-analysis.md). Start with
the standard Carpentries header:
MARKDOWN
---
title: "Your Episode Title"
teaching: 30
exercises: 15
---
:::::::::::::::::::::::::::::::::::::: questions
- First question your episode addresses
- Second question
::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::: objectives
- First learning objective
- Second learning objective
::::::::::::::::::::::::::::::::::::::::::::::::
## Section 1
Your content here — explanations, instructions, code blocks, images.
:::::::::::::::::::::::::::::::::::: challenge
### Exercise Title
Exercise instructions here.
::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::: keypoints
- First key takeaway
- Second key takeaway
::::::::::::::::::::::::::::::::::::::::::::::::
Step 2: Register It in config.yaml
Open config.yaml and add your new file name to the
episodes list:
Step 3: Commit and Push
- Save both files
- In GitHub Desktop, write a commit summary (e.g., “Add urban heat episode”)
- Click Commit to main, then Push origin
- Wait a few minutes, then check your lesson website — your new episode should appear in the navigation
Exercise: Build Your Module
Using the geospatial teaching element you designed this morning, create a Carpentries episode:
- Create a new
.mdfile in yourepisodes/folder - Add the YAML header with title, teaching time, and exercise time
- Write at least a
questionsblock, anobjectivesblock, one content section with a heading, and akeypointsblock - Add the file to
config.yaml - Commit and push
- Verify that your episode appears on your lesson website
If time allows, add a second section, an exercise block, or a callout.
Reference: Example Lesson Repository
To see a completed example of a multi-episode Carpentries lesson
built using this workflow, see the Data Analysis module we created: github.com/SpatialTurn/DataAnalysis.
Pay attention to the episodes/ folder and the
config.yaml file to see how episodes are organized.
You can also use the template we created at github.com/SpatialTurn/carpentrytemp.github.io as a starting point for a custom landing page for your workshop.
- Markdown is the language used to write Carpentries lesson content — it is plain text with simple formatting rules.
- The Carpentries Workbench template generates a professional lesson website automatically from your Markdown files.
- Each episode is a single
.mdfile in theepisodes/folder; theconfig.yamlfile controls which episodes appear and in what order. - GitHub Desktop lets you edit lesson files locally and push changes without using the command line.