Python API Reference

get_html_theme_path()

sphinx_bulma_theme.get_html_theme_path()[source]

For use inside Sphinx’s conf.py file:

import sphinx_bulma_theme

html_theme = "bulma"
html_theme_path = [sphinx_bulma_theme.get_html_theme_path()]

html_theme_options = {
    'show_topbar': False,
    'sidebar_right': True,
}

add_classes_to_node()

sphinx_bulma_theme.add_classes_to_node(class_names, node)[source]

sets a list of class names in the node. Used for injecting bulma modifiers in the final HTML generated by Sphinx.

Parameters:
  • class_names – a list of strings
  • node – the target node

process_admonition_node

sphinx_bulma_theme.process_admonition_node(node, admonition_type, color, size)[source]

applies the given color and size modifiers to admonition nodes

Parameters:
  • node – the target docutils.nodes.Admonition (subclass) node
  • admonition_type – see sphinx_bulma_theme.admonition_map
  • color – a string, such as is-danger
  • size – a string, such as is-small or None

bulmanize_documentation

sphinx_bulma_theme.bulmanize_documentation(app, doctree, fromdocname)[source]

applies necessary internal node transformations before HTML rendering:

  • Loads the admonition_class from theme options
  • Iterate over sphinx_bulma_theme.admonition_map