skillfed

mkdocs-simple-hooks

Define your own hooks for mkdocs, without having to create a new package.

mkdocs-simple-hooks v0.1.5 236.5K downloads/30d#8,982 on PyPI68
Permissive license MIT DORMANT released

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-hooks

uv

uv add mkdocs-simple-hooks

poetry

poetry add mkdocs-simple-hooks

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Documentation

Tags

mkdocs custom hooksmkdocs plugin without packagemkdocs build lifecycle hooksmkdocs event handlerssimple mkdocs extensions
mkdocs-pluginbuild-automation

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

mkdocs-awesome-pages-plugin

A plugin for MkDocs that lets you customize…

permissive · top 5,000 on PyPI

mkdocs-monorepo-plugin

Enables building multiple sets of documentation…

permissive · top 5,000 on PyPI

mkdocs-link-marker

A MkDocs plugin that automatically marks…

permissive · top 5,000 on PyPI

mkdocs-get-deps

Scans a MkDocs configuration file to…

permissive · top 5,000 on PyPI

mkdocs-macros-plugin

Extends MkDocs with Jinja2 templating to use…

permissive · top 5,000 on PyPI

mkdocs-include-markdown-plugin

A MkDocs plugin that includes content from…

permissive · top 15,000 on PyPI

mkdocs-multirepo-plugin

Merges documentation from multiple Git…

permissive · top 15,000 on PyPI

mkdocs-meta-manager

A MkDocs plugin that automatically applies meta…

permissive · top 5,000 on PyPI

mkdocs-exclude

A mkdocs plugin that excludes files and…

permissive · top 15,000 on PyPI

jinjanator-plugins

Provides the plugin API and hook decorators…

permissive · top 5,000 on PyPI