From bbddc6423ccf682798527e9279ba0b3cb64fca56 Mon Sep 17 00:00:00 2001 From: Tiziano Zito Date: Mon, 9 Dec 2024 16:49:49 +0100 Subject: [PATCH] suppress sphinx spurious warning when auto-generating the API docs sphinx.errors.SphinxWarning: ../docs/reference/api.md::toctree directive not expected with external-toc [etoc.toctree] This workaround is suggested here: https://github.com/executablebooks/sphinx-external-toc/issues/36 Until that bug and https://github.com/executablebooks/sphinx-external-toc/issues/79 are fixed, we need this! --- docs/_config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_config.yml b/docs/_config.yml index 972ef4b..f15a7ac 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -42,6 +42,8 @@ sphinx: - sphinx.ext.autodoc config: + suppress_warnings : ["etoc.toctree"] # Workaround for: https://github.com/executablebooks/sphinx-external-toc/issues/36 + # and: https://github.com/executablebooks/sphinx-external-toc/issues/79 autodoc_default_options: { "members": True, # Include module/class members. "member-order": 'bysource', # Order members as in source file.