<!-- vale off -->

<a id="cheat-sheet-myst"></a>

# Markdown/MyST cheat sheet

<!-- vale on -->

This file contains the syntax for commonly used Markdown and MyST markup.
Open it in your text editor to quickly copy and paste the markup you need.

See the [MyST style guide](https://canonical-documentation-with-sphinx-and-readthedocscom.readthedocs-hosted.com/style-guide-myst/) for detailed information and conventions.

Also see the [MyST documentation](https://myst-parser.readthedocs.io/en/latest/index.html) for detailed information on MyST, and the [Canonical Documentation Style Guide](https://docs.ubuntu.com/styleguide/en) for general style conventions.

## H2 heading

### H3 heading

#### H4 heading

##### H5 heading

## Inline formatting

- UI element
- `code`
- **command**
- `Key`
- *Italic*
- **Bold**

## Code blocks

Start a code block:

```none
code:
  - example: true
```

```default
# Demonstrate a code block
code:
  - example: true
```

```yaml
# Demonstrate a code block
code:
  - example: true
```

<a id="a-section-target-myst"></a>

## Links

- [Canonical website](https://canonical.com/)
- [Links](#a-section-target-myst)
- [Link text](#a-section-target-myst)
- [LXD](https://canonical.com/lxd/docs/default/index.html.md)
- [Link text](https://canonical.com/lxd/docs/default/index.html.md)

## Navigation

Use the following syntax::

```none
```{toctree}
:hidden:

sub-page1
sub-page2
```
```

## Lists

1. Step 1
   - Item 1
     - Sub-item
   - Item 2
     1. Sub-step 1
     2. Sub-step 2
2. Step 2
   1. Sub-step 1
      - Item
   2. Sub-step 2

Term 1
: Definition

Term 2
: Definition

## Tables

## Markdown tables

| Header 1                   | Header 2   |
|----------------------------|------------|
| Cell 1<br>Second paragraph | Cell 2     |
| Cell 3                     | Cell 4     |

Centered:

| Header 1                   | Header 2   |
|----------------------------|------------|
| Cell 1<br>Second paragraph | Cell 2     |
| Cell 3                     | Cell 4     |

## List tables

| Header 1                         | Header 2   |
|----------------------------------|------------|
| Cell 1<br/><br/>Second paragraph | Cell 2     |
| Cell 3                           | Cell 4     |

Centered:

| Header 1                         | Header 2   |
|----------------------------------|------------|
| Cell 1<br/><br/>Second paragraph | Cell 2     |
| Cell 3                           | Cell 4     |

## Notes

#### NOTE
A note.

#### TIP
A tip.

#### IMPORTANT
Important information

#### CAUTION
This might damage your hardware!

## Images

![Alt text](https://assets.ubuntu.com/v1/b3b72cb2-canonical-logo-166.png)

![Alt text](https://assets.ubuntu.com/v1/b3b72cb2-canonical-logo-166.png)

## Reuse

### Keys

Keys can be defined at the top of a file, or in a `myst_substitutions` option in `conf.py`.

This is **included** text.

This is a substitution that includes a code block: `code block`

### File inclusion

```default

LXD is free software and released under [AGPL-3.0-only](https://www.gnu.org/licenses/agpl-3.0.en.html) (it may contain some contributions that are licensed under the Apache-2.0 license, see [License and copyright](contributing)).
It’s an open source project that warmly welcomes community projects, contributions, suggestions, fixes and constructive feedback.


```

## Tabs

Tab 1

Content Tab 1

Tab 2

Content Tab 2

## Glossary

<a id="term-some-term"></a>

some term
: Definition of the example term.

[some term](#term-some-term)

## More useful markup

- #### Versionadded
  Added in version X.Y.

---

## Custom extensions

### Related links

Related links at the top of the page (surrounded by `---`):

```none
relatedlinks: https://github.com/canonical/sphinx-related-links, [RTFM](https://www.google.com)
discourse: 12345
```

For more information, see the [`sphinx-related-links` README](https://github.com/canonical/sphinx-related-links/blob/main/README.md).

### The <spellexception>spellexception</spellexception> role

Terms that should not be checked by the spelling checker: <spellexception>PurposelyWrong</spellexception>

For more information, see the [`sphinx-roles` README](https://github.com/canonical/sphinx-roles/blob/main/README.md).

### Terminal

A single-line terminal view that separates input from output:

`root@vampyr:/home/user/directory/# ``the input command`
```text
the output
```

For more information, see the [`sphinx-terminal` README](https://github.com/canonical/sphinx-terminal/blob/main/README.md).

### YouTube links

A link to a YouTube video:


            <p class="youtube_link">
              <a href="https://www.youtube.com/watch?v=iMLiK1fX4I0" target="_blank">
                <span title="Demo" class="play_icon">▶</span>
                <span title="Demo">Watch on YouTube</span>
              </a>
            </p>
        
For more information, see the [`sphinx-youtube-links` README](https://github.com/canonical/sphinx-youtube-links/blob/main/README.md).
