From 868f1ea5f4f4a5c6491c5e23f8f87e99fe8fcdfe Mon Sep 17 00:00:00 2001 From: chrysle Date: Thu, 29 Jun 2023 10:40:18 +0200 Subject: [PATCH] Minor fixes for MkDocs configuration (#1008) --- README.md | 2 +- installation.md | 1 + mkdocs.yml | 8 +++++--- noxfile.py | 7 ++++--- 4 files changed, 11 insertions(+), 7 deletions(-) create mode 120000 installation.md diff --git a/README.md b/README.md index af4ffb5011..b0143d042d 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ python pipx.pyz ensurepath ### Use with pre-commit -pipx [has pre-commit support](docs/installation.md#pre-commit). +pipx [has pre-commit support](installation.md#pre-commit). ### Shell completions diff --git a/installation.md b/installation.md new file mode 120000 index 0000000000..ce2cdfef4b --- /dev/null +++ b/installation.md @@ -0,0 +1 @@ +docs/installation.md \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index bdd1256d6c..4f7c54d486 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,12 +3,14 @@ site_description: execute binaries from Python packages in isolated environments theme: name: "material" -google_analytics: - - 'UA-90243909-2' - - 'auto' repo_name: pypa/pipx repo_url: https://github.com/pypa/pipx edit_uri: edit/main/docs/ +extra: + analytics: + provider: 'google' + property: 'UA-90243909-2' + nav: - Home: "index.md" diff --git a/noxfile.py b/noxfile.py index cb9b68a9d0..4b5180d184 100644 --- a/noxfile.py +++ b/noxfile.py @@ -199,7 +199,7 @@ def build_docs(session): "PIPX__DOC_DEFAULT_PYTHON" ] = "typically the python used to execute pipx" session.run("python", "scripts/generate_docs.py") - session.run("mkdocs", "build") + session.run("mkdocs", "build", "--strict") @nox.session(python=PYTHON_DEFAULT_VERSION) @@ -207,13 +207,14 @@ def publish_docs(session): session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install(*DOC_DEPENDENCIES) build_docs(session) - session.run("mkdocs", "gh-deploy") + session.run("mkdocs", "gh-deploy", "--strict") @nox.session(python=PYTHON_DEFAULT_VERSION) def watch_docs(session): session.install(*DOC_DEPENDENCIES) - session.run("mkdocs", "serve") + session.run("python", "scripts/generate_docs.py") + session.run("mkdocs", "serve", "--strict") @nox.session(python=PYTHON_DEFAULT_VERSION)