Registry / web-framework / sphinx-panels

sphinx-panels

JSON →
library0.6.0pypypiunverified

sphinx-panels is a Sphinx extension that enables creating responsive panel layouts in reStructuredText or MyST Markdown. It allows arranging content into cards, grids, and more, leveraging Bootstrap-like CSS. The current version is 0.6.0, with releases occurring intermittently based on feature development and bug fixes.

pip install sphinx-panels
INSTALL
IMPORT
SIG · SPHINX-PANELS
S
sphinx-panels
web-frameworkpythonv0.6.0
Install
5.3s avg
Import
Disk
91MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 90.7MB
glibc
py 3.103.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.
fix
Consult 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.
fix
Update 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.
fix
If 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.
Agent activity
7 hits · last 30 days
node
6
Resources
sphinx-panels — pip install sphinx-panels · libregistry