Skip to content

A template document

Admonitions REF#

Example

Important

Square brackets "[]" mean the option/parameter is optional. They might include a description of the parameter.

???+ important
    Square brackets "[]" mean the option/parameter is optional. 
    They might include a description of the parameter.

Code blocks REF#

Example

bubble_sort.py
def bubble_sort(items):
    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]
``` python title="bubble_sort.py" hl_lines="3 4"
def bubble_sort(items):
    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]
```

Code block with annotation REF#

Example

Enabling annotation feature.
theme:
features:
    - content.code.annotate # (1)
  1. :man_raising_hand: I'm a code annotation! I can contain code, formatted text, images, ... basically anything that can be written in Markdown.
``` yaml title="Enabling annotation feature."
theme:
features:
    - content.code.annotate # (1)
```
```markdown
1.  :man_raising_hand: I'm a code annotation! I can contain `code`, __formatted
    text__, images, ... basically anything that can be written in Markdown.
```
Enabling annotation feature.
theme:
features:
    - content.code.annotate

Including external files REF#

Example

.gitignore
.cache
site
public
``` title=".gitignore"
\--8<-- ".gitignore"  # (1)
```
  1. "\" is included so that the expression doesn't include the file.

Last update: July 13, 2022
Created: July 13, 2022