Math, code and comments
Math, code blocks with colors and notes only you can see.
Math
Between $ in the middle of the text, like , or between $$ as a block:
Formulas become MathML: the browser draws them, with nothing to download.
Code
Three backticks, the language name and the code:
function hello(name) {
return `Hello, ${name}!`;
}
The colors follow the language: go, js, py, sh, yaml, html, css and many others.
Comments
Text between %% and %% is a comment: it shows while you edit and never goes to the site.
Use them for reminders, drafts and instructions for whoever edits, like in the _index note of the site folder.
In the Studio, the formatting bar has the Comment (stays off the site) button. Narration skips comments too.
Code blocks in the Studio
In the Studio editor, a code block gets a background, the language name and a Copy button. The three backticks only show with the cursor inside the block.