MkDocs Git Revision Date Plugin

0.3.2 · active · verified Mon Apr 13

mkdocs-git-revision-date-plugin is an MkDocs plugin that automatically retrieves and displays the last Git revision date for each Markdown page in an MkDocs site. It provides the revision date in ISO (YYYY-mm-dd) format for use in page templates or directly within Markdown files. As of version 0.3.2, it is considered to be in maintenance mode, with more feature-rich development continuing in the `mkdocs-git-revision-date-localized-plugin` fork.

Warnings

Install

Quickstart

Add the plugin to your `mkdocs.yml` file under the `plugins` section. The revision date can then be accessed in Markdown files using the `{{ git_revision_date }}` Jinja2 variable, or in theme templates via `page.meta.revision_date`. Remember to include the `search` plugin explicitly if you define any plugins.

plugins:
  - search
  - git-revision-date

# Example usage in a Markdown file:
# Page last revised on: {{ git_revision_date }}

# Example usage in an MkDocs template (e.g., in a custom theme):
# {% if page.meta.revision_date %}
# <small>Last updated {{ page.meta.revision_date }}</small>
# {% endif %}

view raw JSON →