From c573c2d13a02323ebee138467327ff7f3d557ad8 Mon Sep 17 00:00:00 2001
From: RibhuDP <ribhu.daspurkayastha@analog.com>
Date: Wed, 10 Apr 2024 11:56:33 +0530
Subject: [PATCH] docs: Use adi-doctools

1. Add extension and theme in conf.py
2. Add doc build products to gitignore
3. Add requirements file

Signed-off-by: RibhuDP <ribhu.daspurkayastha@analog.com>
---
 .github/workflows/doc.yml    |  5 +----
 .gitignore                   |  3 ++-
 docs/source/conf.py          | 15 +++++++--------
 docs/source/requirements.txt |  3 +++
 4 files changed, 13 insertions(+), 13 deletions(-)
 create mode 100644 docs/source/requirements.txt

diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 86b552c..f74a647 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -17,10 +17,7 @@ jobs:
 
       - name: Install dependencies
         run: |
-          sudo apt install -y python3-numpy
-          pip install -r requirements_doc.txt
-          python -m pip install sphinx-toolbox
-          pip install sphinx myst_parser
+          pip install -r docs/source/requirements_doc.txt
           sudo apt-get install doxygen graphviz -y
               
       - name: Check doc build
diff --git a/.gitignore b/.gitignore
index f910997..c245253 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-.github/CODEOWNERS
\ No newline at end of file
+.github/CODEOWNERS
+docs/build/
\ No newline at end of file
diff --git a/docs/source/conf.py b/docs/source/conf.py
index cb77de2..f863bf8 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -6,9 +6,9 @@
 # -- Project information -----------------------------------------------------
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
 
-project = 'Precision Toolbox for MATLAB'
-copyright = '2023, Analog Devices Inc.'
-author = 'Analog Devices Inc.'
+repository = 'PrecisionToolbox'
+project = 'Precision Toolbox'
+copyright = '2023-2024, Analog Devices Inc.'
 
 # -- General configuration ---------------------------------------------------
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -28,18 +28,17 @@
 
 
 extensions = [
-    'sphinx_toolbox.collapse'
+    'adi_doctools'
     ]
 
 templates_path = ['_templates']
 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 
 
-
 # -- Options for HTML output -------------------------------------------------
 # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
 
-html_theme = "bizstyle"
-html_static_path = ['_static']
+html_theme = "cosmic"
+html_static_path = []
 
-html_logo = "adi_logo.png"
\ No newline at end of file
+#html_logo = "adi_logo.png"
\ No newline at end of file
diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt
new file mode 100644
index 0000000..38e1f0c
--- /dev/null
+++ b/docs/source/requirements.txt
@@ -0,0 +1,3 @@
+sphinx
+myst_parser
+https://github.com/analogdevicesinc/doctools/releases/download/latest/adi-doctools.tar.gz
\ No newline at end of file