Only one level 1 per page
On this site, the level 1 heading is generated automatically from the title field of the front matter. Always start the body of your pages at ##, never at #.
Write documentation without ever touching HTML
Markdown syntax
The basics of Markdown syntax, enough to write all the documentation of your project.
Prerequisites:
Software:
Machines/Tools:
All the documentation of your project (docs/) is written in Markdown: a
lightweight markup language, in plain text, which is turned automatically
into formatted web pages. No need to know HTML: a few
symbols are enough.
Markdown was created in 2004 by John Gruber, with the help of Aaron Swartz, with a precise goal: that a text written in Markdown should stay readable and understandable as it is, even without being turned into a web page, unlike HTML.
<h2>Objectives</h2>
<p>Design a robot able to sort <strong>3 categories</strong>
of waste, for a demonstration at the Forum des Sciences.</p>
<ul>
<li>Plastic</li>
<li>Glass</li>
<li>Metal</li>
</ul>
## Objectives
Design a robot able to sort **3 categories** of waste, for
a demonstration at the Forum des Sciences.
- Plastic
- Glass
- Metal
The same content, but the Markdown can be read directly: no need to mentally strip out tags to understand the text.
.docx to see the difference..md file opens with absolutely
any text editor, on any system, and still will
in 20 years. A .docx depends on Word (or compatible software)
to stay readable.Markdown is not specific to this site. It has become a kind of common language of technical documentation:
**bold**,
*italic*, `code`) largely follows Markdown syntax.Learning Markdown now gives you a skill you can reuse directly well beyond this workshop.
# Level 1 heading
## Level 2 heading
### Level 3 heading
**Bold text**
*Italic text*
***Bold and italic***
Bold text Italic text Bold and italic
[Link text](https://example.com)

> A quote.
Some `inline code`.
```cpp
void setup() {
pinMode(13, OUTPUT);
}
```
A quote.
Some inline code.
void setup() {
pinMode(13, OUTPUT);
}
| Header 1 | Header 2 |
|---|---|
| Cell 1 | Cell 2 |
This is the format used for most of the templates in this workshop. See for example the table of milestones in Managing time and milestones.
A project’s documentation often contains code: a firmware excerpt, a command to type, a configuration file. Markdown has two ways of writing it.
| Inline code | Code block | |
|---|---|---|
| How to write it | One backtick on each side: `word` |
Three backticks on a line of their own, before and after the code |
| Use it for | A word or a short expression in the middle of a sentence | Several lines to read or copy |
| Examples | platformio.ini, pinMode(), docs/_config.yml |
A firmware excerpt, a series of commands |
After the three opening backticks of a block, always write the
language: cpp for Arduino or ESP32 code, python, bash for
commands, text for anything that is not code. It turns on syntax
highlighting (keywords, strings and comments in colour).
A convention to follow throughout your documentation: what you read or
type (file names, commands, functions, values) goes in code, what
you click (buttons, menus) goes in bold. For example: open
File > Export, then save the file as projet.step.
To show a code block inside another one (as the examples in this tutorial do), surround the whole with four backticks instead of three: otherwise, the first three inner backticks close the block too early.
Your project’s Jekyll site (docs/ folder of your repo) is based
on the Just the Docs theme, which adds a few
useful extras to standard Markdown that you can use directly in your
pages. It is worth browsing its documentation to see all
the possibilities; here are two examples to whet your appetite:
A coloured callout, without writing HTML: add {: .note } (blue) or
{: .warning } (red) just before a quote.
{: .warning }
> Never forget to test your prototype before the demonstration.
These two callouts are already defined in the template’s configuration
(docs/_config.yml, callouts entry). It defines two more, which are used to
flag what remains to be done: {: .a_modifier } (yellow) for example
content to replace, {: .a_supprimer } (red) for instructions to
remove before the submission. See
Customising your project template.
A link turned into a button: add {: .btn } after a link.
[See the project on Onshape](https://cad.onshape.com/...){: .btn .btn-blue }
The “Notre projet sur Onshape” button on the home page of your
template already uses this syntax. Open docs/index.md to see
the real example.
A diagram, written as text: a code block whose language is mermaid.
The template contains one in docs/conception/index.md (block diagram of the
project) and one in docs/etudes.md (FAST diagram): edit them
directly in the file.
A mathematical formula, between two $$: see
Documenting tests and results.
Open your project’s docs/objectifs.md (filled in during the tutorial on the
specification) and check that it uses headings, a
list, and at least one link correctly. Fix it if needed.
Image credit: “Markdown” icon by Icons8, used under the Icons8 free licence (link to icons8.com required).