Skip to main content

Golem Documentation

Michael Bernstein

Plugins Overview

Golem provides a modular, pluggable extension ecosystem built on Pluggy . In addition to creating custom plugins, Golem includes several production-ready bundled plugins for navigation enrichment, repository integrations, document indexes, API reference generation, and test verification.

Bundled Plugins Summary

Plugin Name

Purpose

Documentation

source_links

Automatically generates canonical "Edit this page", view source, and repository links for GitHub, GitLab, and custom git hosts.

Source Links Guide

nav_helpers

Injects hierarchical breadcrumb trails and flattened depth-first navigation trees into template contexts.

Navigation Helpers Guide

index

Compiles an alphabetized, hierarchical back-of-the-book document index from inline indexterm macros.

Index & Glossary Guide

glossary

Compiles an alphabetized terms and definitions glossary from [glossary] description lists across your documentation.

Index & Glossary Guide

apidoc

Extracts Python docstrings using Griffe, generating full API reference trees and providing the golem.apidoc:: ASG macro.

API Reference Manual

doctest

Extracts and executes inline Python code examples in documentation via pytest and asciidoctest.

Doctest Reference Manual

Enabling Plugins

Plugins are explicitly enabled in your site configuration file (golem.toml or pyproject.toml). Listing a plugin in the plugins array activates it during site compilation. The order of declaration determines execution order for lifecycle transform hooks.

In golem.toml

golem.toml
TOML
[plugins]
plugins = [
    "source_links",
    "nav_helpers",
    "index",
    "glossary",
]

In pyproject.toml

pyproject.toml
TOML
[tool.golem.plugins]
plugins = [
    "source_links",
    "nav_helpers",
    "index",
    "glossary",
]

Configuring Plugins

Plugin-specific options are configured in distinct tables matching the plugin name: [plugins.<name>] in golem.toml or [tool.golem.plugins.<name>] in pyproject.toml.

golem.toml
TOML
[plugins]
plugins = ["source_links", "nav_helpers"]

[plugins.source_links]
repo_url = "https://github.com/myorg/myproject"
branch = "main"
docs_dir = "docs"

[plugins.nav_helpers]
home_title = "Home"
home_url = "/"

Golem automatically matches the plugin's name attribute against the configuration table and injects the options into the plugin instance during initialization.

Developing Custom Plugins

To learn how to author your own plugins using pluggy hooks and the GolemPlugin base class, consult the Plugin System Architecture & Authoring Guide .