From 1086fe1db8868e67aadeec6588edbf0303a9af10 Mon Sep 17 00:00:00 2001
From: James Graham <j.graham@soton.ac.uk>
Date: Fri, 19 Mar 2021 19:48:53 +0000
Subject: [PATCH] docs: move to Sphinx config without subdirs

---
 .gitignore                         |  2 +-
 docs/Makefile                      |  4 ++--
 docs/{source => }/conf.py          | 12 ++++++++----
 docs/{source => }/index.rst        |  0
 docs/make.bat                      |  4 ++--
 docs/{source => }/mapping-only.rst |  0
 docs/{source => }/tutorial.rst     |  0
 7 files changed, 13 insertions(+), 9 deletions(-)
 rename docs/{source => }/conf.py (91%)
 rename docs/{source => }/index.rst (100%)
 rename docs/{source => }/mapping-only.rst (100%)
 rename docs/{source => }/tutorial.rst (100%)

diff --git a/.gitignore b/.gitignore
index 2b742f2..fca79a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,7 @@ poetry.toml
 .python-version
 /cover/
 /dist/
-/docs/build/
+/docs/_build/
 /pycgtool.egg-info/
 /tmp/
 
diff --git a/docs/Makefile b/docs/Makefile
index d0c3cbf..d4bb2cb 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -5,8 +5,8 @@
 # from the environment for the first two.
 SPHINXOPTS    ?=
 SPHINXBUILD   ?= sphinx-build
-SOURCEDIR     = source
-BUILDDIR      = build
+SOURCEDIR     = .
+BUILDDIR      = _build
 
 # Put it first so that "make" without argument is like "make help".
 help:
diff --git a/docs/source/conf.py b/docs/conf.py
similarity index 91%
rename from docs/source/conf.py
rename to docs/conf.py
index 6478d81..c09544f 100644
--- a/docs/source/conf.py
+++ b/docs/conf.py
@@ -18,13 +18,12 @@
 # -- Project information -----------------------------------------------------
 
 project = 'PyCGTOOL'
-copyright = '2020, James Graham'
+copyright = '2016, James Graham'
 author = 'James Graham'
 
 # The full version, including alpha/beta/rc tags
 release = '2.0.0'
 
-
 # -- General configuration ---------------------------------------------------
 
 # Add any Sphinx extension module names here, as strings. They can be
@@ -34,15 +33,19 @@ extensions = [
     'autoapi.extension',
     'sphinx_rtd_theme',
     'sphinx.ext.viewcode',
+    # 'recommonmark',
+    'm2r2',
 ]
 
+source_suffix = ['.rst', '.md']
+
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 # This pattern also affects html_static_path and html_extra_path.
-exclude_patterns = []
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 
 
 # -- Options for HTML output -------------------------------------------------
@@ -57,7 +60,8 @@ html_theme = 'sphinx_rtd_theme'
 # so a file named "default.css" will overwrite the builtin "default.css".
 html_static_path = ['_static']
 
+
 # -- Sphinx AudoAPI options --------------------------------------------------
 
 autoapi_type = 'python'
-autoapi_dirs = ['../../pycgtool']
+autoapi_dirs = ['../pycgtool']
diff --git a/docs/source/index.rst b/docs/index.rst
similarity index 100%
rename from docs/source/index.rst
rename to docs/index.rst
diff --git a/docs/make.bat b/docs/make.bat
index 6247f7e..2119f51 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -7,8 +7,8 @@ REM Command file for Sphinx documentation
 if "%SPHINXBUILD%" == "" (
 	set SPHINXBUILD=sphinx-build
 )
-set SOURCEDIR=source
-set BUILDDIR=build
+set SOURCEDIR=.
+set BUILDDIR=_build
 
 if "%1" == "" goto help
 
diff --git a/docs/source/mapping-only.rst b/docs/mapping-only.rst
similarity index 100%
rename from docs/source/mapping-only.rst
rename to docs/mapping-only.rst
diff --git a/docs/source/tutorial.rst b/docs/tutorial.rst
similarity index 100%
rename from docs/source/tutorial.rst
rename to docs/tutorial.rst
-- 
GitLab