pax_global_header 0000666 0000000 0000000 00000000064 15150354234 0014514 g ustar 00root root 0000000 0000000 52 comment=ea7a5fd6b93be33be214be33427625336f7aaa8a
dgarcia360-sphinx-collapse-ea7a5fd/ 0000775 0000000 0000000 00000000000 15150354234 0017224 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/.flake8 0000664 0000000 0000000 00000000036 15150354234 0020376 0 ustar 00root root 0000000 0000000 [flake8]
max-line-length = 88
dgarcia360-sphinx-collapse-ea7a5fd/.github/ 0000775 0000000 0000000 00000000000 15150354234 0020564 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/.github/dependabot.yml 0000664 0000000 0000000 00000000436 15150354234 0023417 0 ustar 00root root 0000000 0000000 version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for Poetry
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
dgarcia360-sphinx-collapse-ea7a5fd/.github/workflows/ 0000775 0000000 0000000 00000000000 15150354234 0022621 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/.github/workflows/ci.yml 0000664 0000000 0000000 00000001257 15150354234 0023744 0 ustar 00root root 0000000 0000000 ---
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: "Set up Python"
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}
- name: "Install dependencies"
run: |
python -m pip install .[test]
# - name: "Lint code"
# run: |
# pre-commit run --all-files
- name: "Build sample"
run: |
make -C docs dirhtml
- name: "Run tests"
run: |
pytest -vvv
dgarcia360-sphinx-collapse-ea7a5fd/.gitignore 0000664 0000000 0000000 00000000164 15150354234 0021215 0 ustar 00root root 0000000 0000000 .coverage
.DS_Store
.eggs
.idea
.pypirc
.pytest_cache
*pyc
*.egg-info
coverage.xml
dist
docs/build
__pycache__
venv
dgarcia360-sphinx-collapse-ea7a5fd/.pre-commit-config.yaml 0000664 0000000 0000000 00000001027 15150354234 0023505 0 ustar 00root root 0000000 0000000 repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
exclude: ^venv/
- repo: https://github.com/pycqa/flake8
rev: '4.0.1'
hooks:
- id: flake8
exclude: ^venv/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-json
dgarcia360-sphinx-collapse-ea7a5fd/.python-version 0000664 0000000 0000000 00000000005 15150354234 0022224 0 ustar 00root root 0000000 0000000 3.12
dgarcia360-sphinx-collapse-ea7a5fd/.readthedocs.yml 0000664 0000000 0000000 00000000743 15150354234 0022316 0 ustar 00root root 0000000 0000000 # Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF and ePub
formats: []
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.8
install:
- requirements: docs/requirements.txt
dgarcia360-sphinx-collapse-ea7a5fd/CHANGELOG.rst 0000664 0000000 0000000 00000001606 15150354234 0021250 0 ustar 00root root 0000000 0000000 =========
Changelog
=========
All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_,
and this project adheres to `Semantic Versioning `_.
0.1.4 - 27 Feb 2026
-------------------
Fixed
=====
* Fixed ``KeyError`` for missing node attributes (e.g. ``backrefs``) in newer
versions of docutils by using ``.pop()`` with a default value of ``None``.
0.1.3 - 22 Feb 2024
-------------------
Added
=====
* The directive can be open by default.
* The extension support paralell builds.
Fixed
=====
* The extension was not compatible with ``sphinx-build latexpdf``.
0.1.2 - 18 May 2022
-------------------
Fixed
=====
* The extension was not compatible with ``sphinx-build latexpdf``.
0.1.1 - 19 Jan 2022
-------------------
Added
=====
* Initial code release
dgarcia360-sphinx-collapse-ea7a5fd/LICENSE.md 0000664 0000000 0000000 00000002067 15150354234 0020635 0 ustar 00root root 0000000 0000000 Copyright (c) 2022-present David Garcia (@dgarcia360).
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
dgarcia360-sphinx-collapse-ea7a5fd/README.rst 0000664 0000000 0000000 00000004077 15150354234 0020723 0 ustar 00root root 0000000 0000000 sphinx-collapse
===============
The ``sphinx-collapse`` extension enhances Sphinx documentation by introducing collapsible sections.
This feature allows documentation authors to create toggles for hiding and revealing detailed content, making documents more manageable and navigable for readers.
Example:
.. image:: https://raw.githubusercontent.com/dgarcia360/sphinx-collapse/main/docs/source/_static/example.png
Features
--------
**Hide content**
Toggle the visibility of content with a Sphinx directive tailored for this purpose.
**Minimal code**
The library does not use JavaScript nor relies on third-party frameworks such as Bootstrap, Tailwind CSS, or Foundation.
**Configurable**
Customize the style of the collapsible directive using options or overriding the CSS.
Installation
------------
#. Install ``sphinx-collapse`` using PIP.
.. code-block:: bash
pip install sphinx-collapse
#. Add the extension to your Sphinx project ``conf.py`` file.
.. code-block:: python
extensions = ['sphinx_collapse']
Usage
-----
Add the collapse directive in your reStructuredText content. Here's a basic example:
.. code-block:: rst
.. collapse:: Click here
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Example output:
.. image:: https://raw.githubusercontent.com/dgarcia360/sphinx-collapse/main/docs/source/_static/example.png
Check out the full documentation for more customizable options at https://sphinx-collapse.readthedocs.io/
Contributing
------------
We encourage public contributions!
Please review `CONTRIBUTING `_ for details on our code of conduct and development process.
License
-------
Copyright (c) 2022 - present David Garcia (`@dgarcia360 `_).
Licensed under the `MIT License `_.
dgarcia360-sphinx-collapse-ea7a5fd/docs/ 0000775 0000000 0000000 00000000000 15150354234 0020154 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/docs/Makefile 0000664 0000000 0000000 00000001176 15150354234 0021621 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
dgarcia360-sphinx-collapse-ea7a5fd/docs/make.bat 0000664 0000000 0000000 00000001374 15150354234 0021566 0 ustar 00root root 0000000 0000000 @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
dgarcia360-sphinx-collapse-ea7a5fd/docs/requirements.txt 0000664 0000000 0000000 00000000025 15150354234 0023435 0 ustar 00root root 0000000 0000000 sphinx-collapse[doc]
dgarcia360-sphinx-collapse-ea7a5fd/docs/source/ 0000775 0000000 0000000 00000000000 15150354234 0021454 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/docs/source/_static/ 0000775 0000000 0000000 00000000000 15150354234 0023102 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/docs/source/_static/css/ 0000775 0000000 0000000 00000000000 15150354234 0023672 5 ustar 00root root 0000000 0000000 dgarcia360-sphinx-collapse-ea7a5fd/docs/source/_static/css/custom.css 0000664 0000000 0000000 00000000411 15150354234 0025712 0 ustar 00root root 0000000 0000000 .collapse-avatar {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.collapse-avatar li {
list-style: none;
text-align: center;
}
.collapse-avatar li img {
max-width: 150px;
}
.collapse-avatar li a {
display: block;
}
dgarcia360-sphinx-collapse-ea7a5fd/docs/source/_static/example.png 0000664 0000000 0000000 00000021454 15150354234 0025251 0 ustar 00root root 0000000 0000000 PNG
IHDR } sRGB gAMA a pHYs od "IDATx^=#E|Ƶǐp1_̪yYd5~ _T!B!'B!OB!rl> !Bi$B!B!OB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