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: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -396,6 +396,10 @@ Let's say you need the ability to infer nav for a sub-directory, but are unhappy
396
396
397
397
[See an example that generates both the files and the navigation covering them](https://github.com/mkdocstrings/mkdocstrings/blob/5802b1ef5ad9bf6077974f777bd55f32ce2bc219/docs/gen_doc_stubs.py#L25).
398
398
399
+
#### Indent lists by 2 spaces, not 4
400
+
401
+
Configure it through [tab_length](https://oprypin.github.io/mkdocs-literate-nav/reference.html#wildcards) or [markdown_extensions](https://oprypin.github.io/mkdocs-literate-nav/reference.html#wildcards)
402
+
399
403
#### Migrating from GitBook?
400
404
401
405
It might be very easy! Just beware of the stricter Markdown parser; it will *not* accept 2-space indentation for sub-lists.
Copy file name to clipboardExpand all lines: docs/reference.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,7 @@ Wildcards (items without a title that have an asterisk in them) get replaced by
90
90
- literate-nav:
91
91
nav_file: SUMMARY.md
92
92
implicit_index: false
93
+
tab_length: 4
93
94
```
94
95
95
96
### Config
@@ -112,6 +113,28 @@ If a directory has a file named [`index.md` or `README.md`](https://www.mkdocs.o
112
113
113
114
This is important when using directory cross-linking, which otherwise makes it impossible to specify a *[section-index][]* page for a subdirectory.
114
115
116
+
#### `tab_length`
117
+
118
+
*integer, default `4`*
119
+
120
+
By default (like in MkDocs), lists need to be indented by 4 spaces. The more modern style is 2 spaces, though.
121
+
122
+
You can change the indentation just for the extension, but that will not affect MkDocs' rendering. If you want to change both at once, install [mdx_truly_sane_lists](https://github.com/radude/mdx_truly_sane_lists) and use it through `markdown_extensions`, instead of this option. See example below.
123
+
124
+
#### `markdown_extensions`
125
+
126
+
*list of mappings, [same as MkDocs](https://www.mkdocs.org/user-guide/configuration/#markdown_extensions)*
0 commit comments