From 265d8ec60573e291e5996cf01ef046c23afec23d Mon Sep 17 00:00:00 2001 From: Christian Emmer <10749361+emmercm@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:13:12 -0700 Subject: [PATCH] Docs: fix mkdocs-material emoji deprecations (#777) --- .github/workflows/gh-pages.yml | 20 ++------------------ .gitignore | 9 ++++++--- docs/requirements.txt | 16 ++++++++++++++++ mkdocs.yml | 5 +++-- 4 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 docs/requirements.txt diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bc9c5a9bb..a6ac12e72 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -61,15 +61,7 @@ jobs: key: ${{ github.ref }} path: .cache - run: | - pip install mkdocs-material - pip install \ - mkdocs-exclude-search \ - mkdocs-git-revision-date-localized-plugin \ - mkdocs-redirects \ - mkdocs-htmlproofer-plugin \ - mdx_truly_sane_lists - - run: | - pip install pillow cairosvg + pip install --requirement docs/requirements.txt sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev - run: mkdocs build --strict --verbose @@ -105,14 +97,6 @@ jobs: key: ${{ github.ref }} path: .cache - run: | - pip install mkdocs-material - pip install \ - mkdocs-exclude-search \ - mkdocs-git-revision-date-localized-plugin \ - mkdocs-redirects \ - mkdocs-htmlproofer-plugin \ - mdx_truly_sane_lists - - run: | - pip install pillow cairosvg + pip install --requirement docs/requirements.txt sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev - run: mkdocs gh-deploy --strict --verbose --force diff --git a/.gitignore b/.gitignore index 1756e5f2e..db1f1e560 100644 --- a/.gitignore +++ b/.gitignore @@ -151,12 +151,15 @@ site/ *.ups *.xdelta +# Always commit some WebStorm configs +!.idea/runConfigurations/* + +# Always commit files in the docs/ folder (ignoring extension ignores above) +!docs/* + # Always commit fixtures !test/fixtures/dats/* !test/fixtures/dats/*/* !test/fixtures/patches/* !test/fixtures/roms/* !test/fixtures/roms/*/* - -# Always commit some WebStorm configs -!.idea/runConfigurations/* diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..bc636c229 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,16 @@ +mkdocs-material + +mkdocs-exclude-search +mkdocs-git-revision-date-localized-plugin +mkdocs-htmlproofer-plugin +mkdocs-material[imaging] +mkdocs-redirects +mdx_truly_sane_lists + +# Requires: +# macOS: +# brew install cairo +# sudo ln -s /opt/homebrew/Cellar/cairo/*/lib/libcairo.2.dylib /usr/local/lib/ +# Linux: sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev +pillow +cairosvg diff --git a/mkdocs.yml b/mkdocs.yml index da66ddb76..d981582fe 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,6 +92,7 @@ nav: - license.md # https://github.com/squidfunk/mkdocs-material/issues/889#issuecomment-582297142: how-to open nav links in new tabs - Download ↗: https://github.com/emmercm/igir/releases/latest" target="_blank + - Donate ↗: https://github.com/sponsors/emmercm - Issues ↗: https://github.com/emmercm/igir/issues?q=is%3Aopen+is%3Aissue+label%3Abug" target="_blank - Discuss ↗: https://github.com/emmercm/igir/discussions" target="_blank @@ -143,8 +144,8 @@ markdown_extensions: # https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/ - attr_list - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg extra: analytics: