From d6ec6e67153c9c05315d106eb48d04fa88b9341f Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Wed, 23 Dec 2020 13:44:43 -0500 Subject: [PATCH] Add support for tabs --- .../docs/Material for mkdocs Formatting.md | 44 ++++++++++++++++++- api/documentation/mkdocs.yml | 1 + 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/api/documentation/docs/Material for mkdocs Formatting.md b/api/documentation/docs/Material for mkdocs Formatting.md index 47d0066..9824f55 100644 --- a/api/documentation/docs/Material for mkdocs Formatting.md +++ b/api/documentation/docs/Material for mkdocs Formatting.md @@ -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!")` \ No newline at end of file +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!"))(); + ``` \ No newline at end of file diff --git a/api/documentation/mkdocs.yml b/api/documentation/mkdocs.yml index b1d6daa..23b0daf 100644 --- a/api/documentation/mkdocs.yml +++ b/api/documentation/mkdocs.yml @@ -15,6 +15,7 @@ markdown_extensions: - pymdownx.superfences - pymdownx.highlight - pymdownx.inlinehilite + - pymdownx.tabbed - mkautodoc