Skip to content

Commit

Permalink
Minor fixes for MkDocs configuration (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysle authored Jun 29, 2023
1 parent 91b11b2 commit 868f1ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions installation.md
8 changes: 5 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,22 @@ 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)
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)
Expand Down

0 comments on commit 868f1ea

Please sign in to comment.