MkDocs Table Reader Plugin

3.1.0 · active · verified Thu Apr 16

mkdocs-table-reader-plugin is an MkDocs plugin designed to directly insert tables from various file formats (like CSV, Excel, JSON, YAML, Feather) into Markdown documentation. It is currently at version 3.1.0 and is actively maintained with regular updates and improvements.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to enable the `mkdocs-table-reader-plugin` in your `mkdocs.yml` and use the `read_csv` macro to embed a table from a CSV file into your Markdown documentation. Create a `mkdocs.yml` file, a sample CSV file in `docs/data/`, and a Markdown file (`docs/index.md`) with the `{{ read_csv(...) }}` tag.

mkdocs.yml:
```yaml
site_name: My Data Docs
plugins:
  - search
  - table-reader

# Optional: Configure data_path if all your tables are in one directory
# plugins:
#   - table-reader:
#       data_path: assets/tables
```

docs/data/my_table.csv:
```csv
Header1,Header2
Value1,ValueA
Value2,ValueB
```

docs/index.md:
```markdown
# My Report

Here is some data from a CSV file:

{{ read_csv('data/my_table.csv') }}

And another one, specifying pandas options:

{{ read_csv('data/my_table.csv', sep=',', header=0) }}

```

view raw JSON →