From 1e4b42be64120077b69db7e83040ffff38d332ec Mon Sep 17 00:00:00 2001 From: Janne Vanhala Date: Thu, 28 Sep 2023 21:11:38 +0300 Subject: [PATCH] Improve documentation - Use `language = 'en'` - Document `Nested` type - Add project description to docs - Split documentation into multiple files to have working Navigation --- docs/api.rst | 9 +++++++++ docs/changelog.rst | 1 + docs/conf.py | 3 ++- docs/contributing.rst | 7 +++++++ docs/index.rst | 39 ++++++--------------------------------- docs/installation.rst | 6 ++++++ docs/license.rst | 5 +++++ 7 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 docs/api.rst create mode 100644 docs/changelog.rst create mode 100644 docs/contributing.rst create mode 100644 docs/installation.rst create mode 100644 docs/license.rst diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 0000000..b7073f2 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,9 @@ +API Documentation +----------------- + +.. module:: qstring + +.. autofunction:: nest +.. autofunction:: unnest +.. autoexception:: ParameterTypeError +.. autodata:: Nested diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 100644 index 0000000..d9e113e --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1 @@ +.. include:: ../CHANGES.rst diff --git a/docs/conf.py b/docs/conf.py index 180c851..be04bc2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,7 +66,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -116,6 +116,7 @@ # further. For a list of options available for each theme, see the # documentation. html_theme_options = { + "description": "Parse querystring parameters to nested objects", "github_user": "fastmonkeys", "github_repo": "qstring", "github_banner": True, diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 0000000..86cfa9d --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,7 @@ +Contributing +------------ + +To contribute to qstring `create a fork`_ on GitHub. Clone your fork, make +some changes, and submit a pull request. + +.. _create a fork: https://github.com/fastmonkeys/qstring diff --git a/docs/index.rst b/docs/index.rst index 7bdfbcd..3ab01aa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,36 +4,9 @@ qstring qstring is a Python library that allows you to create nested objects from a list of querystring parameters. -Installation ------------- - -Use pip to install from PyPI:: - - pip install qstring - -Contributing ------------- - -To contribute to qstring `create a fork`_ on GitHub. Clone your fork, make -some changes, and submit a pull request. - -.. _create a fork: https://github.com/fastmonkeys/qstring - - -API Documentation ------------------ - -.. module:: qstring - -.. autofunction:: nest -.. autofunction:: unnest -.. autoexception:: ParameterTypeError - - -.. include:: ../CHANGES.rst - - -License -------- - -.. include:: ../LICENSE +.. toctree:: + installation + contributing + api + changelog + license diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..5156e29 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,6 @@ +Installation +------------ + +Use pip to install from PyPI:: + + pip install qstring diff --git a/docs/license.rst b/docs/license.rst new file mode 100644 index 0000000..c745e9f --- /dev/null +++ b/docs/license.rst @@ -0,0 +1,5 @@ +License +------- + +.. include:: ../LICENSE +