You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extras.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,63 @@
4
4
5
5
For most [usages it is recommended](README.md#usage) to enable the "deduplicate-toc" Markdown extension, which comes bundled with *mkdocstrings-crystal*. It de-duplicates consecutive items that have the same title in the table of contents. This is important because Crystal can have multiple overloads of a method but in the ToC only their names are shown.
6
6
7
+
## "callouts" extension
8
+
9
+
*mkdocstrings-crystal* auto-enables the ["callouts" extension][] for Markdown (only within doc comments' content), so you can use that syntax instead of the common ["admonition" extension][]'s syntax.
10
+
11
+
!!! example "example.cr"
12
+
```crystal
13
+
# Frobs the bar
14
+
#
15
+
# DEPRECATED: Use `baz` instead.
16
+
def frob(bar)
17
+
end
18
+
```
19
+
20
+
You can also enable that extension for the whole site:
In addition to the [usual admonition styles](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types), *mkdocstrings-crystal* injects styling for the Material theme to enable the following admonition kinds, used [in Crystal documentation](https://crystal-lang.org/reference/syntax_and_semantics/documenting_code.html#admonitions):
Both the default styles and the extra styles work with both the ["callouts" extension][] (write them in all-uppercase) and the ["admonition" extension][] (write them in all-lowercase).
63
+
7
64
## Support for [MkDocs "macros" plugin](https://github.com/fralau/mkdocs_macros_plugin)
8
65
9
66
*Without* support, you have to access the doc root as
/* Based on https://github.com/squidfunk/mkdocs-material/blob/b3c0163b3b6b6e4d2cb4d50fbd535018042c4970/src/assets/stylesheets/main/extensions/markdown/_admonition.scss */
0 commit comments