Skip to content
Snippets Groups Projects
Commit d6026882 authored by Erik Reid's avatar Erik Reid
Browse files

added sphinxcontrib-drawio support

parent 79310a58
No related branches found
No related tags found
No related merge requests found
sphinx-build -b html -t drawio docs/source docs/build
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
# import sys # import sys
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
from datetime import datetime
from importlib import import_module from importlib import import_module
import importlib.metadata
from docutils.parsers.rst import Directive from docutils.parsers.rst import Directive
from docutils import nodes from docutils import nodes
from sphinx import addnodes from sphinx import addnodes
...@@ -55,11 +57,10 @@ def setup(app): ...@@ -55,11 +57,10 @@ def setup(app):
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'BRIAN Polling Manager' project = 'BRIAN Polling Manager'
copyright = '2021, swd@geant.org' copyright = f"{datetime.now().year}, GÉANT"
author = 'swd@geant.org' author = "swd@geant.org"
# The full version, including alpha/beta/rc tags release = importlib.metadata.version('brian_polling_manager')
release = '0.0.1'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
...@@ -73,6 +74,11 @@ extensions = [ ...@@ -73,6 +74,11 @@ extensions = [
'sphinx.ext.coverage' 'sphinx.ext.coverage'
] ]
# the tags variable is injected by sphinx into conf.py
# (toggle this by running ``sphinx-build -t drawio``)
if tags.tags.get("drawio", False): # noqa F821
extensions.append("sphinxcontrib.drawio")
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
......
...@@ -12,3 +12,4 @@ responses ...@@ -12,3 +12,4 @@ responses
PyYAML PyYAML
sphinx sphinx
sphinx-rtd-theme sphinx-rtd-theme
sphinxcontrib-drawio
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment