Skip to content

Commit

Permalink
doc: document new individual code block theme override
Browse files Browse the repository at this point in the history
Signed-off-by: James Knight <james.d.knight@live.com>
  • Loading branch information
jdknight committed Jul 15, 2023
1 parent e79d07a commit 2ab9a5f
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 5 deletions.
6 changes: 6 additions & 0 deletions doc/_themes/sphinx13b/static/sphinx13b.css
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ code.literal {
color: #CE0000;
}

h1 code.literal,
h2 code.literal,
h3 code.literal,
h4 code.literal,
h5 code.literal,
h6 code.literal,
.sphinxsidebarwrapper code.literal {
border: unset;
padding: unset;
Expand Down
17 changes: 12 additions & 5 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,27 @@ Generic configuration
See also |confluence_publish_prefix|_.

.. |confluence_code_block_theme| replace:: ``confluence_code_block_theme``
.. _confluence_code_block_theme:

.. confval:: confluence_code_block_theme

.. versionadded:: 2.2

Specifies the color scheme to use when displaying a Confluence code block macro.
.. note::

This option is only supported using the ``v1``
:ref:`editor <confluence_editor>`.

Specifies the color scheme to use when displaying a Confluence code
block macro.

.. code-block:: python
confluence_code_block_theme = 'Midnight'
.. note::

This option is only supported using the ``v1``
:ref:`editor <confluence_editor>`.
For configuring the theme on individual code blocks, see
:ref:`class hints <confluence_class_hints>`.

.. confval:: confluence_default_alignment

Expand Down
31 changes: 31 additions & 0 deletions doc/guide-class-hints.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. index:: Class hints

.. _confluence_class_hints:

Class hints
===========

The following outlines all available class-related hints supported by the
Confluence builder extension.

``confluence-theme-<theme>``
----------------------------

.. versionadded:: 2.2

When this class hint is applied to a literal/code block, this provides the
ability to override the theme configured for an individual code-block macro.
For example:

.. code-block:: none
.. code-block:: python
:class: confluence-theme-FadeToGrey
def main():
print 'Hello, world!'
if __name__ == '__main__':
main()
See also :ref:`confluence_code_block_theme <confluence_code_block_theme>`.
1 change: 1 addition & 0 deletions doc/guides.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ the Confluence Builder extension in a Sphinx-enabled environment.
.. toctree::
:maxdepth: 1

guide-class-hints
guide-collapse
guide-math
guide-ci

0 comments on commit 2ab9a5f

Please sign in to comment.