Skip to main content

Searchable and sortable tables in Sphinx documentation

Project description

This extension makes it easy to use more expressive tables in Sphinx documentation with DataTables. See the demo and full documentation online.

Installation

pip install sphinx-datatables

Usage

Add the extension in your conf.py:

extensions = [
    "sphinxcontrib.jquery",
    "sphinx_datatables",
]

In your .rst documentation, create a table and add a custom class label. Your table must have a valid header row.

.. csv-table::
    :header: First Name,Last Name
    :class: sphinx-datatable

    John,Smith
    Jane,Doe

Configuration

The following configuration options are available with the following default values:

# in conf.py

# set the version to use for DataTables plugin
datatables_version = "1.13.4"

# name of the class to use for tables to enable DataTables
datatables_class = "sphinx-datatable"

# any custom options to pass to the DataTables constructor. Note that any
# options you set are used for all DataTables.
datatables_options = {}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-datatables-0.2.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

sphinx_datatables-0.2.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page