sphinx-d2lang/sphinx_d2lang/__init__.py
2023-12-10 21:35:56 +01:00

17 lines
401 B
Python

from sphinx.application import Sphinx
from .d2lang import D2langDirective
from typing import Any, Dict, List, Tuple
from shutil import which
def setup(application: Sphinx) -> Dict[str, Any]:
"""
setup extension.
"""
if which('d2'):
application.add_directive('d2lang', D2langDirective)
return {"version": '0.0.1', "parallel_read_safe": True}
else:
raise