From cf8a07475fcfeed81b627eb019897f8515d4f94c Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Sun, 18 Sep 2022 18:47:54 +0200 Subject: [PATCH] Deduplicate the nav specification with literate-nav --- docs/dev-guide/{index.md => README.md} | 2 ++ docs/getting-started.md | 2 +- docs/index.md | 2 +- docs/user-guide/{index.md => README.md} | 1 + mkdocs.yml | 20 +++++--------------- requirements/project-min.txt | 1 + requirements/project.txt | 1 + 7 files changed, 12 insertions(+), 17 deletions(-) rename docs/dev-guide/{index.md => README.md} (89%) rename docs/user-guide/{index.md => README.md} (92%) diff --git a/docs/dev-guide/index.md b/docs/dev-guide/README.md similarity index 89% rename from docs/dev-guide/index.md rename to docs/dev-guide/README.md index b91d76a5..183365e0 100644 --- a/docs/dev-guide/index.md +++ b/docs/dev-guide/README.md @@ -11,6 +11,8 @@ below, or use the *next* and *previous* buttons in the navigation bar at the top of the page to move through the documentation in order. - [Themes](themes.md) +- [Translations](translations.md) - [Plugins](plugins.md) +- [API Reference](api.md) [Contributing Guide]: ../about/contributing.md diff --git a/docs/getting-started.md b/docs/getting-started.md index 50f3a078..3c324149 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -218,4 +218,4 @@ To get help with MkDocs, please use the [GitHub discussions] or [GitHub issues]. [site_name]: user-guide/configuration.md#site_name [site_url]: user-guide/configuration.md#site_url [theme]: user-guide/configuration.md#theme -[User Guide]: user-guide/index.md +[User Guide]: user-guide/README.md diff --git a/docs/index.md b/docs/index.md index f58af717..5f35674d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,7 +11,7 @@ configuration file. Start by reading the [introductory tutorial], then check the [User Guide] for more information. [introductory tutorial]: getting-started.md -[User Guide]: user-guide/index.md +[User Guide]: user-guide/README.md
Getting Started diff --git a/docs/user-guide/index.md b/docs/user-guide/README.md similarity index 92% rename from docs/user-guide/index.md rename to docs/user-guide/README.md index 7e8dfa9a..efa58d4c 100644 --- a/docs/user-guide/index.md +++ b/docs/user-guide/README.md @@ -13,6 +13,7 @@ bar at the top of the page to move through the documentation in order. - [Writing Your Docs](writing-your-docs.md) - [Choosing Your Theme](choosing-your-theme.md) - [Customizing Your Theme](customizing-your-theme.md) +- [Localizing Your Theme](localizing-your-theme.md) - [Configuration](configuration.md) - [Deploying Your Docs](deploying-your-docs.md) diff --git a/mkdocs.yml b/mkdocs.yml index 4b505f4f..c542166d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,21 +18,8 @@ theme: nav: - Home: index.md - Getting Started: getting-started.md - - User Guide: - - Overview: user-guide/index.md - - Installation: user-guide/installation.md - - Writing Your Docs: user-guide/writing-your-docs.md - - Choosing Your Theme: user-guide/choosing-your-theme.md - - Customizing Your Theme: user-guide/customizing-your-theme.md - - Localizing Your Theme: user-guide/localizing-your-theme.md - - Configuration: user-guide/configuration.md - - Deploying Your Docs: user-guide/deploying-your-docs.md - - Developer Guide: - - Overview: dev-guide/index.md - - Themes: dev-guide/themes.md - - Translations: dev-guide/translations.md - - Plugins: dev-guide/plugins.md - - API Reference: dev-guide/api.md + - User Guide: user-guide/ + - Developer Guide: dev-guide/ - About: - Release Notes: about/release-notes.md - Contributing: about/contributing.md @@ -62,6 +49,9 @@ plugins: user-guide/custom-themes.md: dev-guide/themes.md user-guide/styling-your-docs.md: user-guide/choosing-your-theme.md - autorefs + - literate-nav: + nav_file: README.md + implicit_index: true - mkdocstrings: handlers: python: diff --git a/requirements/project-min.txt b/requirements/project-min.txt index 8919601d..1dee5c96 100644 --- a/requirements/project-min.txt +++ b/requirements/project-min.txt @@ -15,6 +15,7 @@ babel==2.9.0 colorama==0.4; platform_system == 'Windows' mdx_gh_links==0.2 markdown-callouts==0.2 +mkdocs-literate-nav==0.5.0 mkdocs-redirects==1.0.1 pymdown-extensions==8.0.1 mkdocstrings-python==0.7.1 diff --git a/requirements/project.txt b/requirements/project.txt index dac875a9..2a1bf6fa 100644 --- a/requirements/project.txt +++ b/requirements/project.txt @@ -15,6 +15,7 @@ babel>=2.9.0 colorama>=0.4; platform_system == 'Windows' mdx_gh_links>=0.2 markdown-callouts>=0.2 +mkdocs-literate-nav>=0.5.0 mkdocs-redirects>=1.0.1 pymdown-extensions>=8.0.1 mkdocstrings-python>=0.7.1