mkdocs-simple-hooks
Define your own hooks for mkdocs, without having to create a new package.
What it is and what it does
mkdocs-simple-hooks is a MkDocs plugin that allows you to register custom hook functions without the overhead of creating and maintaining a separate plugin package. You define Python functions in your project (typically in a `docs/hooks.py` file) and register them in `mkdocs.yml` to run at specific build lifecycle events—such as `on_pre_build` or `on_post_build`—using a simple module-path syntax.
The plugin acts as a bridge between your MkDocs configuration and arbitrary Python code, letting you automate tasks like copying files, modifying content, or triggering external processes as part of your documentation build. It's designed for lightweight, project-specific customizations that don't warrant a full plugin package.
Use it for:
- Copy or generate files before the documentation build (e.g., README to index.md)
- Run custom preprocessing or validation logic on your docs during the build
- Trigger external tools or scripts at specific points in the MkDocs lifecycle
- Conditionally enable or disable build steps using environment variables
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A MkDocs plugin that lets you define custom hooks directly in your project without creating a separate plugin package.
Yes, if you need simple, project-scoped hooks for MkDocs and are comfortable with dormant maintenance. The package is lightweight, has no known vulnerabilities, and solves a real friction point—avoiding a full plugin package for small customizations. Verify compatibility with your MkDocs version before adopting.
Install
mkdocs-simple-hooks on PyPI
pip
pip install mkdocs-simple-hooksuv
uv add mkdocs-simple-hookspoetry
poetry add mkdocs-simple-hooksInstalling mkdocs-simple-hooks
Before you install
Low install friction with a single runtime dependency on mkdocs. Maintenance is dormant—last release was in January 2022, though the repository remains unarchived.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install mkdocs-simple-hooks
# In mkdocs.yml:
plugins:
- mkdocs-simple-hooks:
hooks:
on_pre_build: "docs.hooks:my_function"
# In docs/hooks.py:
def my_function(*args, **kwargs):
pass
Verify before relying
- Whether the package works with MkDocs versions released after the last release date of 2022-01-07
- Current compatibility with Python 3.10 given the dormant maintenance status
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — mkdocs |
| Maintenance | dormant — 1,680 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 236,486/month — #8,982 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mkdocs_simple_hooks-0.1.5-py3-none-any.whl
Tags
More Documentation packages
Docutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
griffeGriffe extracts the complete structure and…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
mkdocs-awesome-pages-pluginA plugin for MkDocs that lets you customize…
permissive · top 5,000 on PyPI
mkdocs-monorepo-pluginEnables building multiple sets of documentation…
permissive · top 5,000 on PyPI
mkdocs-link-markerA MkDocs plugin that automatically marks…
permissive · top 5,000 on PyPI
mkdocs-get-depsScans a MkDocs configuration file to…
permissive · top 5,000 on PyPI
mkdocs-macros-pluginExtends MkDocs with Jinja2 templating to use…
permissive · top 5,000 on PyPI
mkdocs-include-markdown-pluginA MkDocs plugin that includes content from…
permissive · top 15,000 on PyPI
mkdocs-multirepo-pluginMerges documentation from multiple Git…
permissive · top 15,000 on PyPI
mkdocs-meta-managerA MkDocs plugin that automatically applies meta…
permissive · top 5,000 on PyPI
mkdocs-excludeA mkdocs plugin that excludes files and…
permissive · top 15,000 on PyPI
jinjanator-pluginsProvides the plugin API and hook decorators…
permissive · top 5,000 on PyPI