This codelab shows you how to create your own Codelab and contribute it to this site for the QNX community.
We use the open-source Google Codelabs Tools to build the codelabs, but you really only need to know how to write Markdown files.
Below is the high level workflow we'll work through in this codelab:

Let's get started! Next, we'll install the pre-requisites to prepare your environment.
That's it! Since the codelabs are just written as Markdown files, this is all you really need. Optionally though, you may wish to install Claat so you can render and preview your work locally.
This step is optional, but highly recommended so you can fully render and preview your codelab in your local environment.
# Install go globally as environment variable
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
git clone https://github.com/qnx/tools.git
claat directory:cd tools/claat
go to build Claat:go install
go version
claat --help
Your system should be ready to start writing codelabs!
Follow these guidelines to write a high-quality codelab.
Now that you are ready to build a codelab, you nedd to fork and clone your own copy of the codelab repo.
# Make sur to use the correct clone URL for your fork:
git clone https://github.com/your-username/codelabs.git
# OR
git clone git@github.com:your-username/codelabs.git
git checkout -b <name-of-your-codelab>
This section explains how to create a new codelab.
Only work in the markdown folder under your created codelab repo's new directory. Ensure you do not make changes to other folders or files, so that your contribution is clean and doesn't interfere with other draft codelabs. Inconsistencies or changes to other files will unfortunately result in a rejected pull request.
~./markdown/:mkdir -p ./codelabs/markdown/<name-of-your-codelab>
codelabs/markdown/markdown-template.md into your newly created directory, so that your draft includes all the required metadata.cp ./codelabs/markdown/markdown-template.md ./codelabs/markdown/<name-of-your-codelab>/
The metadata block at the very top of the file looks like this:id: name-of-your-codelab
title: Title of Your Codelab
summary: One or two sentences describing what the reader will build or learn.
categories: Getting Started
tags: beginner
platforms: Raspberry Pi 5
published: YYYY-MM-DD
featured: false
status: draft
authors: Your Name
feedback_link: https://github.com/qnx/codelabs/issues
The landing page uses these fields to sort, filter and feature codelabs:id must exactly match the .md filename for Claat to work correctly.categories lists the topics shown as filters on the landing page, with 1-2 per codelab, written the way you want them displayed (for example AI & ML, Camera & Sensors). Reuse an existing topic where you can. A new label automatically becomes a new filter.tags sets the level, which must be exactly one of beginner, intermediate or advanced.platforms is optional. List the hardware or host your codelab targets, for example Raspberry Pi 5, QEMU.published is the date your codelab first goes live, as YYYY-MM-DD. Set it once and don't change it later, because the landing page shows the newest codelabs first.featured: true shows the codelab in the Featured row at the top of the landing page, which holds 3 codelabs at most. Leave it as false unless a maintainer asks you to change it.status should be published once your codelab is ready. Codelabs marked draft are left off the landing page..md claat to view your .md file locally as HTML. Otherwise, skip to step 7.# cd out from ~./markdown/<name-of-your-codelab> dir to ~./codelabs
claat export -f html -o docs ./markdown/<name-of-your-codelab>/<name-of-your-codelab>.md
codelabs/docs.http://localhost:8000 from your codelabs/docs/ directory# cd to ./codelabs/markdown/<name-of-your-codelab>/
claat serve <name-of-your-codelab>.md
# From the ~./codelabs/markdown/<name-of-your-codelab> directory
git add .
git commit -m "add comments for your commit"
git push -u origin name-of-your-codelab
Congratulations! We will review and add your pull request soon. Thank you for contributing to QNX Codelabs!