17 lines
401 B
Python
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
|