From a016de321487abbd381a9bd5b68539b98fc4a6c8 Mon Sep 17 00:00:00 2001 From: Rong Tao Date: Tue, 27 Feb 2024 10:01:50 +0800 Subject: [PATCH] mkdocs: Add Theme and more pages Signed-off-by: Rong Tao --- mkdocs.yml | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 4b47fd66..086636c2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,4 +6,114 @@ copyright: Copyright © 2021 - 2024 Rong Tao nav: - Home: index.md + - Tutorials: + - Code Style: code-style.md + - Developer: developers.md +theme: + name: material + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: black + toggle: + icon: material/weather-sunny + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: black + toggle: + icon: material/weather-night + name: Switch to light mode + features: + # - navigation.instant # see https://github.com/ultrabug/mkdocs-static-i18n/issues/62 + - navigation.tracking + - navigation.tabs + - navigation.sections + - navigation.indexes + - navigation.top + - navigation.footer + - toc.follow + - search.highlight + - search.share + - search.suggest + - content.action.view + - content.action.edit + - content.tabs.link + - content.code.copy + - content.code.select + - content.code.annotations + +markdown_extensions: + # Officially Supported Extensions + - abbr + - admonition + - attr_list + - def_list + - footnotes + - md_in_html + - meta + - sane_lists + - tables + - toc: + permalink: true + - wikilinks + # Third Party Extensions(Bundles, PyMdown Extensions) + - pymdownx.arithmatex: + generic: true + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.details + - pymdownx.highlight + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde + +plugins: + - search + - include-markdown + - mkdocstrings: + default_handler: python + handlers: + python: + options: + # Headings + show_root_heading: true + show_root_toc_entry: true + show_object_full_path: true + # Members + show_submodules: false + # Docstrings + docstring_section_style: spacy + - i18n: + docs_structure: folder + fallback_to_default: true + languages: + - locale: en + default: true + name: English + - locale: zh + default: false + name: 中文 + nav_translations: + Home: 主页 + Tutorials: 教程 + Code Style: 代码风格 + Developer: 开发者 + +extra: + generator: false + social: + - icon: fontawesome/solid/paper-plane + link: mailto:rtoax@foxmail.com + - icon: fontawesome/brands/github + link: https://github.com/Rtoax/ulpatch