conf.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 sphinx_rtd_theme
  12. import os
  13. import sys
  14. sys.path.insert(0, os.path.abspath('..'))
  15. print(f"Root dir: {sys.path[0]}")
  16. # -- Project information -----------------------------------------------------
  17. project = 'redmail'
  18. copyright = '2022, Mikael Koli'
  19. author = 'Mikael Koli'
  20. # -- General configuration ---------------------------------------------------
  21. # Add any Sphinx extension module names here, as strings. They can be
  22. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  23. # ones.
  24. extensions = [
  25. 'sphinx.ext.doctest',
  26. 'sphinx.ext.autodoc',
  27. 'sphinx.ext.coverage',
  28. 'sphinx.ext.napoleon',
  29. 'sphinx_rtd_theme',
  30. 'sphinx.ext.extlinks',
  31. ]
  32. rst_prolog = """
  33. .. include:: <s5defs.txt>
  34. """
  35. # Extension settings
  36. napoleon_google_docstring = True
  37. napoleon_numpy_docstring = True
  38. autodoc_typehints = 'none'
  39. autodoc_member_order = 'bysource'
  40. # Add any paths that contain templates here, relative to this directory.
  41. templates_path = ['_templates']
  42. # List of patterns, relative to source directory, that match files and
  43. # directories to ignore when looking for source files.
  44. # This pattern also affects html_static_path and html_extra_path.
  45. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  46. html_logo = "logo.png"
  47. html_theme_options = {
  48. 'logo_only': True,
  49. 'display_version': False,
  50. }
  51. # -- Options for HTML output -------------------------------------------------
  52. # The theme to use for HTML and HTML Help pages. See the documentation for
  53. # a list of builtin themes.
  54. #
  55. html_title = "Advanced Email Sender for Python"
  56. html_theme = 'sphinx_rtd_theme'
  57. html_favicon = 'favicon.ico'
  58. # Add any paths that contain custom static files (such as style sheets) here,
  59. # relative to this directory. They are copied after the builtin static files,
  60. # so a file named "default.css" will overwrite the builtin "default.css".
  61. html_static_path = ['_static']
  62. html_css_files = [
  63. 'css/types.css',
  64. 'css/colors.css',
  65. ]
  66. # Cross references
  67. extlinks = {
  68. "stdlib": ("https://docs.python.org/3/library/%s", None)
  69. }