From b60b294be1c9fd1f146be2a47fcca2ed3fd0cd21 Mon Sep 17 00:00:00 2001 From: Frederic Werner <20406381+wernerfred@users.noreply.github.com> Date: Thu, 8 Apr 2021 12:27:37 +0200 Subject: [PATCH] docs: minor adjustments (#1889) * docs: add version to mkdocs docker image * docs: add version tag to build image * feat(docs): add back-to-top button * feat(docs): add back-to-top button * feat(docs): add dark theme --- .github/workflows/deploy-docs.yml | 2 +- .github/workflows/pr-docs.yml | 2 +- docs/mkdocs.yml | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 3a0037b5..e06a4ed4 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -41,7 +41,7 @@ jobs: - name: 'Build with mkdocs-material via Docker' working-directory: docs # --user is required for build output file ownership to match the CI user instead of the containers internal user - run: docker run --rm --user "$(id -u):$(id -g)" -v "${PWD}:/docs" squidfunk/mkdocs-material build --strict + run: docker run --rm --user "$(id -u):$(id -g)" -v "${PWD}:/docs" squidfunk/mkdocs-material:7.1.0 build --strict - name: 'If a tagged version, fix canonical links and remove `404.html`' if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/pr-docs.yml b/.github/workflows/pr-docs.yml index d0f1d030..4f2ee3cb 100644 --- a/.github/workflows/pr-docs.yml +++ b/.github/workflows/pr-docs.yml @@ -19,4 +19,4 @@ jobs: - uses: actions/checkout@v2 - name: 'Build with mkdocs-material via Docker' - run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build --strict + run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material:7.1.0 build --strict diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 2bf8826e..ef649ef2 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -31,8 +31,26 @@ theme: repo: fontawesome/brands/github features: - navigation.tabs + - navigation.top - navigation.expand - navigation.instant + palette: + # Light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: indigo + accent: indigo + toggle: + icon: material/weather-night + name: Switch to dark mode + # Dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: indigo + accent: blue + toggle: + icon: material/weather-sunny + name: Switch to light mode # We make some minor style adjustments or resolve issues that upstream `mkdocs-material` would not accept a PR for: extra_css: