Examples of blocks for writing documentation¤
A collection of examples of non-obvious blocks that can be used when writing documentation.
Admonitions¤
inline usage¤
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.
!!! info inline end "Lorem ipsum"
Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nulla et euismod nulla.
Curabitur feugiat, tortor non consequat
finibus, justo purus auctor massa, nec
semper lorem quam in massa.
Use inline end
to align to the right (left for rtl languages).
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.
!!! info inline "Lorem ipsum"
Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nulla et euismod nulla.
Curabitur feugiat, tortor non consequat
finibus, justo purus auctor massa, nec
semper lorem quam in massa.
Use inline
to align to the left (right for rtl languages).
Collapsible blocks¤
Open styled details
Nested details!
And more content again.
Footnotes¤
Footnotes[^1] have a label[^test-label] and the footnote's content.
[^1]: This is a footnote content.
[^test-label]: A footnote on the label: "test-label".
Footnotes1 have a label2 and the footnote's content.
Highlight¤
```console linenums="42" hl_lines="1 4-6"
$ echo hello world!
hello world!
$ git clone git@github.com:dd/dd_yandex_pay.git
$ cd dd_yandex_pay
$ hatch run docs:serve
INFO - Building documentation...
INFO - Cleaning site directory
INFO - mkdocstrings_handlers: Formatting signatures requires Black to be
installed.
INFO - Documentation built in 1.96 seconds
INFO - [02:05:37] Watching paths for changes: 'docs/src', 'mkdocs.yml',
'docs/theme', 'dd_yandex_pay', 'README.md'
INFO - [02:05:37] Serving on http://127.0.0.1:7000/
```
$ echo hello world!
hello world!
$ git clone git@github.com:dd/dd_yandex_pay.git
$ cd dd_yandex_pay
$ hatch run docs:serve
INFO - Building documentation...
INFO - Cleaning site directory
INFO - mkdocstrings_handlers: Formatting signatures requires Black to be
installed.
INFO - Documentation built in 1.96 seconds
INFO - [02:05:37] Watching paths for changes: 'docs/src', 'mkdocs.yml',
'docs/theme', 'dd_yandex_pay', 'README.md'
INFO - [02:05:37] Serving on http://127.0.0.1:7000/
Inline¤
$ python3 -c "import this"
import this
Annotates¤
- Simple is better than complex.
Diagrams¤
```mermaid
graph LR
A[Start] --> B{Error?};
B -->|Yes| C[Hmm...];
C --> D[Debug];
D --> B;
B ---->|No| E[Yay!];
```
graph LR
A[Start] --> B{Error?};
B -->|Yes| C[Hmm...];
C --> D[Debug];
D --> B;
B ---->|No| E[Yay!];
Content tabs¤
=== "Tab 1"
Markdown **content**.
Multiple paragraphs.
=== "Tab 2"
More Markdown **content**.
- list item a
- list item b
Markdown content.
Multiple paragraphs.
More Markdown content.
- list item a
- list item b
Smart Symbols¤
Markdown | Result | Markdown | Result |
---|---|---|---|
(tm) |
™ | <-- |
← |
(c) |
© | <--> |
↔ |
(r) |
® | =/= |
≠ |
c/o |
℅ | 1/4, etc. |
¼, etc. |
+/- |
± | 1st 2nd etc. |
1st 2nd etc. |
--> |
→ |
Keys¤
Ctrl+Alt+Del
Icons and Emojis¤
Tooltips¤
Lists¤
Tables¤
Created: 2023-09-21 22:12:30+0000