diff --git a/docs/source/conf.py b/docs/source/conf.py index 0de8cd445..b9a908167 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,6 +56,9 @@ if os.getenv("READTHEDOCS"): else: release = yosys_ver todo_include_todos = False +elif os.getenv("YOSYS_DOCS_RELEASE") is not None: + release = yosys_ver + todo_include_todos = False else: release = yosys_ver todo_include_todos = True @@ -87,5 +90,9 @@ def setup(app: Sphinx) -> None: from util.RtlilLexer import RtlilLexer app.add_lexer("RTLIL", RtlilLexer) - from furo_ys.lexers.YoscryptLexer import YoscryptLexer - app.add_lexer("yoscrypt", YoscryptLexer) + try: + from furo_ys.lexers.YoscryptLexer import YoscryptLexer + app.add_lexer("yoscrypt", YoscryptLexer) + except ModuleNotFoundError: + from pygments.lexers.special import TextLexer + app.add_lexer("yoscrypt", TextLexer)