Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 90.7MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 5.3s · import 0.000s · 91MB
91MB installed
● package 91MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Extension activation
✓ extensions = ['sphinx_panels']
✗ from sphinx_panels import ...
Sphinx extensions are activated by adding their name to the `extensions` list in `conf.py`, not by importing Python modules directly into your project's code.
To use sphinx-panels, first enable it in your Sphinx project's `conf.py` file by adding 'sphinx_panels' to the `extensions` list. Then, you can use directives like `.. grid::` or `.. panel::` in your reStructuredText or MyST Markdown files.
# conf.py
project = 'My Panel Project'
copyright = '2024, Your Name'
extensions = [
'sphinx.ext.autodoc',
'sphinx_panels' # Enable the extension
]
html_theme = 'alabaster'
# example.rst (or .md if using MyST)
# .. grid:: 1 2 2 3
# :gutter: 2
#
# .. grid-item-card:: Card Title 1
# :shadow: sm
#
# This is the content for the first card.
#
# .. grid-item-card:: Card Title 2
# :shadow: sm
#
# This is the content for the second card.
#
# .. grid-item-card:: Card Title 3
# :shadow: sm
#
# This is the content for the third card.
Debug
Known issues
breakingPrior to v0.2.0, sphinx-panels underwent a 'Major Revamp'. The CSS classes and internal structure for panels were significantly different. Existing `.. panel::` directives or custom CSS relying on pre-0.2.0 structure may break.fixConsult the v0.2.0 changelog and updated documentation for the new class structure and directive options. Re-evaluate and update any custom CSS or directive usage.
affects: <0.2.0 to 0.2.0+
breakingIn v0.3.0, the option syntax for directives like `.. panel::` or `.. grid::` was improved. Older, less explicit syntax might no longer be parsed correctly, leading to build failures or incorrect rendering.fixUpdate directive options to follow the new, more explicit syntax as shown in the latest documentation. For example, options might require a `key: value` format instead of just a bare `key`.
affects: <0.3.0 to 0.3.0+
gotchaSome Sphinx themes may have CSS rules that conflict with `sphinx-panels`, especially regarding button styling or general layout, leading to unexpected rendering or overridden styles.fixIf panels are not rendering as expected, use browser developer tools to inspect the generated HTML and CSS. Look for conflicting styles and consider adding custom CSS in your `_static/custom.css` to override them, or experiment with a different Sphinx theme.
affects: All versions
Upgrade
Version history
0.6.0latest on PyPI · released Jun 3, 2021
Audit
Dependencies
sphinxrequiredCore dependency for Sphinx extensions.