From 0a50d2f0411d3827e21619d7074813718995b3bf Mon Sep 17 00:00:00 2001 From: Willem Dekker Date: Sun, 12 Jul 2020 11:25:13 +0200 Subject: [PATCH] docs: add dark and light theme Basically contains most changes from: https://github.com/SensorsIot/IOTstack/pull/338 * Dark and light modes * Always expand left-navigation folders, improving usability --- .github/workflows/main.yml | 14 +++++++------- mkdocs.yml | 27 +++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e277d06..ea6e0240 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,10 +10,10 @@ jobs: name: Deploy docs runs-on: ubuntu-latest steps: - - name: Checkout master - uses: actions/checkout@v1 - - - name: Deploy docs - uses: mhausenblas/mkdocs-deploy-gh-pages@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.x + - run: pip install mkdocs-material + - run: pip install mkdocs-git-revision-date-localized-plugin + - run: mkdocs gh-deploy --force diff --git a/mkdocs.yml b/mkdocs.yml index 3bd986db..57195c7b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,10 +1,29 @@ site_name: IOTstack site_description: 'Docker stack for getting started on IOT on the Raspberry PI' + + +# Repository +repo_url: https://github.com/SensorsIot/IOTstack +repo_name: SensorsIot/IOTstack +edit_uri: "https://github.com/SensorsIot/IOTstack/edit/master/" + theme: name: material -plugins: - - search -# - awesome-pages + palette: + - scheme: default + toggle: + icon: material/weather-sunny + name: Switch to dark mode + - scheme: slate + toggle: + icon: material/weather-night + name: Switch to light mode + features: + - tabs + - navigation.expand + plugins: + - search + - git-revision-date-localized markdown_extensions: + - admonition - pymdownx.superfences -repo_url: https://github.com/SensorsIot/IOTstack