conf.py 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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_book_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_book_theme',
  30. 'sphinx.ext.extlinks',
  31. 'sphinx_copybutton',
  32. ]
  33. rst_prolog = """
  34. .. include:: <s5defs.txt>
  35. """
  36. # Extension settings
  37. napoleon_google_docstring = True
  38. napoleon_numpy_docstring = True
  39. autodoc_typehints = 'none'
  40. autodoc_member_order = 'bysource'
  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 = ['_build', 'Thumbs.db', '.DS_Store']
  47. html_logo = "logo.png"
  48. html_theme_options = {
  49. "repository_url": "https://github.com/Miksus/red-mail",
  50. "use_repository_button": True,
  51. "repository_branch": "master",
  52. "use_issues_button": True,
  53. "use_download_button": True,
  54. "use_fullscreen_button": True,
  55. #"use_edit_page_button": True,
  56. "logo_only": True,
  57. }
  58. #html_sidebars = {}
  59. # -- Options for HTML output -------------------------------------------------
  60. # The theme to use for HTML and HTML Help pages. See the documentation for
  61. # a list of builtin themes.
  62. #
  63. html_title = "Advanced Email Sender for Python"
  64. html_theme = 'sphinx_book_theme'
  65. html_favicon = 'favicon.ico'
  66. # Add any paths that contain custom static files (such as style sheets) here,
  67. # relative to this directory. They are copied after the builtin static files,
  68. # so a file named "default.css" will overwrite the builtin "default.css".
  69. html_static_path = ['_static']
  70. html_css_files = [
  71. 'css/types.css',
  72. 'css/colors.css',
  73. ]
  74. # Cross references
  75. extlinks = {
  76. "stdlib": ("https://docs.python.org/3/library/%s", None)
  77. }