--- id: mkdocs-simple-hooks version: "0.1.5" license: MIT license_treatment: permissive maintenance: dormant --- # mkdocs-simple-hooks — Define your own hooks for mkdocs, without having to create a new package. License: permissive · Maintenance: dormant · Downloads: 236.5K/mo ## 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 above — 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 pip install mkdocs-simple-hooks uv add mkdocs-simple-hooks 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 236.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mkdocs custom hooks, mkdocs plugin without package, mkdocs build lifecycle hooks, mkdocs event handlers, simple mkdocs extensions, mkdocs-plugin, build-automation [View on SkillFed](https://skillfed.io/packages/mkdocs-simple-hooks) · [View on PyPI](https://pypi.org/project/mkdocs-simple-hooks/)