From 454b77534bf76fcdb41612699b8a78052e8a1df4 Mon Sep 17 00:00:00 2001
From: Anton Tetov <anton@tetov.se>
Date: Mon, 3 Oct 2022 21:14:35 +0200
Subject: [PATCH] Nicer docs

---
 docs/conf.py      | 17 ++++++++---------
 docs/index.md     |  4 ++--
 docs/reference.md | 10 +++-------
 pyproject.toml    |  1 -
 4 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 45dbb93..f742f90 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -37,13 +37,12 @@ extensions = [
     "sphinx.ext.autosummary",
     "sphinx.ext.doctest",
     "sphinx.ext.intersphinx",
-    "sphinx.ext.mathjax",
     "sphinx.ext.extlinks",
-    "sphinxcontrib.apidoc",
+    # "sphinxcontrib.apidoc",  # removed since only 1 module
 ]
 
 source_suffix = {
-    ".rst": "restructuredtext",
+    # ".rst": "restructuredtext",
     ".md": "markdown",
 }
 
@@ -77,12 +76,12 @@ html_static_path = ["_static"]
 # -- Extensions --------------------------------------------------------------
 
 # apidoc
-apidoc_module_dir = "../ur_py_ctl"
-apidoc_output_dir = "reference"
-apidoc_excluded_paths = ["tests"]
-apidoc_separate_modules = False
-apidoc_toc_file = False
-apidoc_module_first = True
+# apidoc_module_dir = "../ur_py_ctl"
+# apidoc_output_dir = "reference"
+# apidoc_excluded_paths = ["tests"]
+# apidoc_separate_modules = False
+# apidoc_toc_file = False
+# apidoc_module_first = True
 #
 # auto{summary,doc,class}
 autosummary_generate = True
diff --git a/docs/index.md b/docs/index.md
index 5903c33..a28d972 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,8 +1,8 @@
-# Welcome to ur_py_ctl's documentation!
+# Welcome to ur_py_ctl's documentation
 
 ```{toctree}
 ---
-maxdepth: 1
+maxdepth: 2
 caption: Contents
 ---
 installation
diff --git a/docs/reference.md b/docs/reference.md
index 1667a34..5ea3acb 100644
--- a/docs/reference.md
+++ b/docs/reference.md
@@ -1,10 +1,6 @@
 # API Reference
 
-```{toctree}
----
-maxdepth: 2
-titlesonly:
-glob:
----
-reference/*
+```{eval-rst}
+.. automodule:: ur_py_ctl.urscript_commands
+   :members:
 ```
diff --git a/pyproject.toml b/pyproject.toml
index 011e1c1..1c42e95 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -21,7 +21,6 @@ pre-commit = "^2.18.1"
 pytest = "^7.1.1"
 Sphinx = "^5.2.2"
 myst-parser = {extras = ["linkify"], version = "^0.18.1"}
-sphinxcontrib-apidoc = "^0.3.0"
 sphinx-rtd-theme = "^1.0.0"
 isort = "^5.10.1"
 
-- 
GitLab