Skip to content

Commit

Permalink
Add support for tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Dec 23, 2020
1 parent 71e53f7 commit d6ec6e6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
44 changes: 43 additions & 1 deletion api/documentation/docs/Material for mkdocs Formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,46 @@ print("Hello world!") if __name__ == "__main__"
( _ => console.log("Hello world!"))();
```
```
This is an inline Java highlight `#!java system.out.println("Hello world!")`
This is an inline Java highlight `#!java system.out.println("Hello world!")`


## Content Tabs
See: [Material for mkdocs: Content Tabs](https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#content-tabs)

### Basic Tabs
```md
=== "Tab 1"
Hello
=== "Tab 2"
World
```

=== "Tab 1"
Hello
=== "Tab 2"
World

### Tabs in Admonitions with Code Blocks
```md
!!! example
"Hello world" in many languages:
=== "Python"
```python
print("Hello world!") if __name__ == "__main__"
```
=== "JavaScript"
```js
( _ => console.log("Hello world!"))();
```
```

!!! example
"Hello world" in many languages:
=== "Python"
```python
print("Hello world!") if __name__ == "__main__"
```
=== "JavaScript"
```js
( _ => console.log("Hello world!"))();
```
1 change: 1 addition & 0 deletions api/documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ markdown_extensions:
- pymdownx.superfences
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.tabbed
- mkautodoc


Expand Down

0 comments on commit d6ec6e6

Please sign in to comment.