From 8d9628260f832fe13458098723e5bd3672134d94 Mon Sep 17 00:00:00 2001 From: Georg Krause <mail@georg-krause.net> Date: Fri, 1 Apr 2022 16:05:16 +0200 Subject: [PATCH] Migrate documentation to markdown --- docs/conf.py | 9 +++++++-- docs/index.md | 10 ++++++++++ docs/index.rst | 17 ----------------- pyproject.toml | 1 + 4 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 docs/index.md delete mode 100644 docs/index.rst diff --git a/docs/conf.py b/docs/conf.py index c87d636..15e7f44 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,7 +30,8 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.githubpages"] +extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", + "sphinx.ext.githubpages", "myst_parser"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -39,7 +40,11 @@ templates_path = ["_templates"] # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = ".rst" +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', +} # The master toctree document. master_doc = "index" diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..777b894 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,10 @@ +```{include} ../README.md +``` + +# API documentation + +```{eval-rst} +.. automodule:: requests_http_message_signatures + :members: + :special-members: +``` diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 751f231..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. include:: ../README.rst - -API documentation -================= - -.. automodule:: requests_http_message_signatures - :members: - :special-members: - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/pyproject.toml b/pyproject.toml index 894e2ec..cfd1fcc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ requests = "^2" [tool.poetry.dev-dependencies] Sphinx = "^4.5.0" coverage = "^6.3.2" +myst-parser = "^0.17.0" [build-system] requires = ["poetry-core>=1.0.0"] -- GitLab