MkDocs plugin to directly insert tables from files into markdown.
Project description
mkdocs-table-reader-plugin
MkDocs plugin that enables a markdown tag like {{ read_csv('table.csv') }}
to directly insert various table formats into a page.
For a workflow with other plugins see the blogpost building reproducible reports with MkDocs
Installation
Install the plugin using pip
:
pip install mkdocs-table-reader-plugin
Next, add the following lines to your mkdocs.yml
:
plugins:
- search
- table-reader
If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set.
Usage
In your markdown documents you can now use:
{{ read_csv('path_to_table.csv') }}
Where the path is relative to the location of your project's mkdocs.yml
file (although you can change that to be relative to your docs/
directory).
- There are readers for
.csv
,.fwf
,.json
,.xlsx
,.yaml
and.tsv
. There is also theread_raw()
reader that will allow you to insert tables (or other content) already in markdown format.
Documentation and how-to guides
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs-table-reader-plugin-2.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cef5a1127e2c04955d5716e67ede66971a0a5ee3dd5386af6cba53c707c78b8b |
|
MD5 | 887135d6758055e0221abde43136c8ef |
|
BLAKE2b-256 | fd6c5780b61421a67700c13d4ddb72655fd266fd1fd07895df420120bbfe0bf6 |
Hashes for mkdocs_table_reader_plugin-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98041627b4982c5a5c6dac6f2e97767c53658771eed926057aa48c61a4e494f |
|
MD5 | 2bec18dc0e3e4b8c2bd5771d16a2c46c |
|
BLAKE2b-256 | 147f846e6862d4ae7aa6786ff99114f3c5672c3b371bf90b24f44a21d27e9961 |