Skip to content

Commit

Permalink
feat: switch to mkdocs-material-insiders
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Mar 27, 2024
1 parent 29c6521 commit 14789d3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ jobs:
run: |
pip install -U pip -r requirements.txt
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
- name: Install mkdocs-material-insiders
run: ./scripts/install-mkdocs-material-insiders.sh
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Build the site
run: mkdocs build
env:
Expand Down
7 changes: 6 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ plugins:
- glightbox
- offline:
enabled: !ENV [OFFLINE, false]
- optimize:
enabled: !ENV [CI, false]
- privacy:
assets_exclude:
- pagead2.googlesyndication.com/*
- social:
enabled: !ENV [CI, false]
cards: true
Expand All @@ -90,7 +94,7 @@ plugins:
blog_toc: true
post_date_format: long
archive: true
# archive_pagination: true
archive_pagination: true
pagination: true
pagination_format: "$link_first $link_previous ~2~ $link_next $link_last"
- rss:
Expand Down Expand Up @@ -177,6 +181,7 @@ theme:
icon: material/brightness-4
name: Switch to system preference
markdown_extensions:
- material.extensions.preview
- abbr
- admonition
- attr_list
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mkdocs-git-authors-plugin<1
mkdocs-git-committers-plugin-2<3
mkdocs-git-revision-date-localized-plugin<2
mkdocs-glightbox<1
mkdocs-material[imaging]<10
# mkdocs-material[imaging] @ git+https://github.com/squidfunk/mkdocs-material-insiders.git@master
mkdocs-minify-plugin<1
mkdocs-rss-plugin<2
mkdocs-table-reader-plugin<3
Expand Down
15 changes: 15 additions & 0 deletions scripts/install-mkdocs-material-insiders.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -eux

version=${1:-''}

if [ -z "$version" ]; then
echo "Using latest version of mkdocs-material-insiders"
version_suffix=""
else
echo "Using version $version of mkdocs-material-insiders"
version_suffix="@$version"
fi

pip install "mkdocs-material[imaging] @ git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git${version_suffix}"

0 comments on commit 14789d3

Please sign in to comment.