Skip to main content

mkdocs-pivot-table

A lightweight MkDocs plugin that renders interactive, sortable, and filterable comparison tables directly in your documentation.

Features

  • Sortable columns – Click any column header to sort ascending/descending
  • Drag-to-reorder – Drag column headers to change order
  • State preservation – View state is saved to the URL (shareable links) and localStorage
  • Hide/show columns – Toggle individual columns via toolbar buttons
  • Hide/show rows – Toggle individual rows via toolbar buttons
  • Swap rows/columns – Transform the table orientation with one click
  • Reset button – Restore the original view
  • Zero config – Works out of the box with minimal setup

Installation

Add to your requirements.txt:

-e git+https://github.com/Aldo-f/mkdocs-pivot-table.git#egg=mkdocs-pivot-table

Or install from PyPI (when published):

pip install mkdocs-pivot-table

Then enable the plugin in your mkdocs.yml:

plugins:
  - mkdocs_pivot_table

Usage

Place a table in your markdown using the [pivot-table] wrapper:

[pivot-table]
| Feature | npm | pnpm | Bun | pip | uv |
|---------|-----|------|------|-----|----|
| Speed   | Slow | Fast | Fastest | Slow | Fast |
| Dedup   | No  | Yes  | Yes   | No  | Yes  |
| Runtime | No  | Yes  | Yes   | No  | Yes  |
| Maturity| High| High | Medium| High| Medium|
[/pivot-table]

The table will render as an interactive <table> with:

  • Sorting: Click column headers to sort
  • Reordering: Drag column headers to reorder
  • Filtering: Use toolbar buttons to hide/show columns or rows
  • Swapping: Click "Swap R/Col" to transpose the table
  • Sharing: The current view is reflected in the URL

Configuration

Optional configuration in mkdocs.yml:

plugins:
  - mkdocs_pivot_table:
      asset_url: "https://cdn.jsdelivr.net/npm/pivot-table-kit@0.1.0/dist/pivot-table.js"
      asset_inline: false
Option Default Description
asset_url CDN URL External JavaScript asset URL
asset_inline false Whether to inline the JS instead of loading from URL

Requirements

  • MkDocs ≥ 1.5.0
  • Python ≥ 3.9

License

MIT

Metadata

Release files for mkdocs-pivot-table 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-pivot-table 0.4.0
File Interpreter ABI Platform
mkdocs_pivot_table-0.4.0-py3-none-any.whl Python 3 none any Details

Release files / mkdocs_pivot_table-0.4.0-py3-none-any.whl

Download URL mkdocs_pivot_table-0.4.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b61e95657d50e3edd7b1284f029030a5951044c2716cec4dc85306b79742f780
BLAKE2b-256 checksum
How to use checksums
bd1a88c47218a917c95ee55ff11fdd4acba7ed86cc304df730113ed89f1c0aa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page