API Reference¶
This page documents the internal Python API of sphinx-lightbox. The
public authoring interface is standard Sphinx image and figure
markup plus the .. lightbox:: directive.
The Python API below is primarily useful for contributors.
Extension Setup¶
- lightbox.lightbox.setup(app: Sphinx) ExtensionMetadata[source]¶
Nodes¶
- class lightbox.lightbox.LightboxContainer(rawsource: str = '', *children, **attributes: Any)[source]¶
Outer wrapper grouping the trigger thumbnail and the overlay.
Directive¶
- class lightbox.lightbox.LightboxDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶
- final_argument_whitespace = True¶
May the final argument contain whitespace?
- has_content = False¶
May the directive have content?
- option_spec = {'alt': <function unchanged>, 'caption': <function unchanged>, 'class': <function unchanged>, 'latex-width': <function unchanged>, 'percentage': <function positive_int_list>}¶
Mapping of option names to validator functions.
- optional_arguments = 0¶
Number of optional arguments after the required arguments.
- required_arguments = 1¶
Number of required directive arguments.