From 8fa1d7191e5b9d5bcb8654c575e42829b90362c4 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Tue, 22 Apr 2025 20:35:41 +0100 Subject: [PATCH] docs: remove unecessary content --- docs/.gitignore | 3 ++- docs/source/_static/custom.css | 5 +++++ docs/source/conf.py | 8 ++++++-- docs/source/index.rst | 2 +- docs/source/python_api/index.rst | 8 ++++++++ 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 docs/source/_static/custom.css create mode 100644 docs/source/python_api/index.rst diff --git a/docs/.gitignore b/docs/.gitignore index d653dcca..8e992075 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,6 +1,7 @@ __pycache__ _build -source/python_api +source/python_api/* +!/source/python_api/index.rst source/cpp_api source/lua_api **.pyc diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 00000000..7ad2b7e8 --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,5 @@ +/* Hide third level of secondary sidebar onwards */ +.md-sidebar--secondary .md-nav__list .md-nav__list .md-nav__list { + display: none; + } + \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 8aef5ed7..f36adea8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -39,7 +39,7 @@ ] master_doc = "index" source_suffix = {'.rst': 'restructuredtext', '.md': 'restructuredtext'} -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "python_api/library_root.rst"] # Syntax highlighting pygments_style = "sphinx" @@ -57,6 +57,8 @@ # HTML output configuration html_theme = "sphinx_blue_robotics_theme" html_static_path = ["_static"] +html_css_files = ['custom.css'] + html_theme_options = { "site_url": SITE_URL, "repo_url": REPO_URL, @@ -124,8 +126,10 @@ "rootFileName": "library_root.rst", "doxygenStripFromPath": root_path, "rootFileTitle": "API Reference", - "createTreeView": True, + "createTreeView": False, + "contentsDirectives": False, "exhaleExecutesDoxygen": True, + "fullToctreeMaxDepth": 1, "exhaleDoxygenStdin": f"INPUT = {os.path.join(root_path, 'brping')}", "verboseBuild": True, } diff --git a/docs/source/index.rst b/docs/source/index.rst index e4b1dd0d..5a69dcd3 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,4 +8,4 @@ A python implementation of the Blue Robotics Ping messaging protocol and a devic :maxdepth: 2 :caption: Contents: - python_api/library_root + python_api/index diff --git a/docs/source/python_api/index.rst b/docs/source/python_api/index.rst new file mode 100644 index 00000000..4808424c --- /dev/null +++ b/docs/source/python_api/index.rst @@ -0,0 +1,8 @@ +============= +API Reference +============= + + +.. include:: unabridged_api.rst.include + :start-after: -------- +