Skip to content

Commit

Permalink
Remove dependence on mkdocs-simple-hooks
Browse files Browse the repository at this point in the history
Since mkdocs v1.4, the hooks are a native feature
  • Loading branch information
Tom-Hubrecht committed Feb 5, 2024
1 parent 1d2b759 commit 99a0c72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions docs/hooks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import shutil

def copy_fonts(config, **kwargs):
site_dir = config['site_dir']
shutil.copytree('docs/static/fonts', os.path.join(site_dir, 'get'))

def on_post_build(config, **kwargs):
site_dir = config["site_dir"]
shutil.copytree("docs/static/fonts", os.path.join(site_dir, "get"))
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ markdown_extensions:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg

hooks:
- docs/hooks.py

plugins:
- search
- minify:
minify_html: true
- mkdocs-simple-hooks:
hooks:
on_post_build: "docs.hooks:copy_fonts"

nav:
- "Getting started": index.md
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# The documentation uses 'mkdocs', which is written in Python
mkdocs-material
mkdocs-minify-plugin
mkdocs-simple-hooks

0 comments on commit 99a0c72

Please sign in to comment.