conf.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Configuration file for the Sphinx documentation builder.
  2. #
  3. # This file only contains a selection of the most common options. For a full
  4. # list see the documentation:
  5. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6. # -- Path setup --------------------------------------------------------------
  7. # If extensions (or modules to document with autodoc) are in another directory,
  8. # add these directories to sys.path here. If the directory is relative to the
  9. # documentation root, use os.path.abspath to make it absolute, like shown here.
  10. #
  11. # import os
  12. # import sys
  13. # sys.path.insert(0, os.path.abspath('.'))
  14. # -- Project information -----------------------------------------------------
  15. from __future__ import annotations
  16. import os
  17. import sys
  18. import minigrid
  19. project = "MiniGrid"
  20. copyright = "2022"
  21. author = "Farama Foundation"
  22. # The full version, including alpha/beta/rc tags
  23. release = minigrid.__version__
  24. sys.path.insert(0, os.path.abspath("../.."))
  25. # -- General configuration ---------------------------------------------------
  26. # Add any Sphinx extension module names here, as strings. They can be
  27. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  28. # ones.
  29. extensions = [
  30. "sphinx.ext.napoleon",
  31. "sphinx.ext.doctest",
  32. "sphinx.ext.autodoc",
  33. "sphinx.ext.githubpages",
  34. "myst_parser",
  35. "sphinx_github_changelog",
  36. ]
  37. source_suffix = {
  38. ".rst": "restructuredtext",
  39. ".md": "markdown",
  40. }
  41. # Add any paths that contain templates here, relative to this directory.
  42. templates_path = ["_templates"]
  43. # List of patterns, relative to source directory, that match files and
  44. # directories to ignore when looking for source files.
  45. # This pattern also affects html_static_path and html_extra_path.
  46. exclude_patterns = []
  47. # Napoleon settings
  48. napoleon_use_ivar = True
  49. napoleon_use_admonition_for_references = True
  50. # See https://github.com/sphinx-doc/sphinx/issues/9119
  51. napoleon_custom_sections = [("Returns", "params_style")]
  52. # -- Options for HTML output -------------------------------------------------
  53. # The theme to use for HTML and HTML Help pages. See the documentation for
  54. # a list of builtin themes.
  55. #
  56. html_theme = "furo"
  57. html_title = "MiniGrid Documentation"
  58. html_baseurl = "https://minigrid.farama.org/"
  59. html_copy_source = False
  60. html_favicon = "_static/img/minigrid-favicon.png"
  61. html_theme_options = {
  62. "light_logo": "img/minigrid.svg",
  63. "dark_logo": "img/minigrid-white.svg",
  64. "gtag": "G-FBXJQQLXKD",
  65. "versioning": True,
  66. "source_repository": "https://github.com/Farama-Foundation/Minigrid/",
  67. "source_branch": "master",
  68. "source_directory": "docs/",
  69. }
  70. html_static_path = ["_static"]
  71. html_css_files = []
  72. # -- Generate Changelog -------------------------------------------------
  73. sphinx_github_changelog_token = os.environ.get("SPHINX_GITHUB_CHANGELOG_TOKEN")