conf.py 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. ]
  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. "repository_url": "https://github.com/Miksus/red-mail",
  49. "use_repository_button": True,
  50. "repository_branch": "master",
  51. "use_issues_button": True,
  52. "use_download_button": True,
  53. "use_fullscreen_button": True,
  54. #"use_edit_page_button": True,
  55. "logo_only": True,
  56. }
  57. #html_sidebars = {}
  58. # -- Options for HTML output -------------------------------------------------
  59. # The theme to use for HTML and HTML Help pages. See the documentation for
  60. # a list of builtin themes.
  61. #
  62. html_title = "Advanced Email Sender for Python"
  63. html_theme = 'sphinx_book_theme'
  64. html_favicon = 'favicon.ico'
  65. # Add any paths that contain custom static files (such as style sheets) here,
  66. # relative to this directory. They are copied after the builtin static files,
  67. # so a file named "default.css" will overwrite the builtin "default.css".
  68. html_static_path = ['_static']
  69. html_css_files = [
  70. 'css/types.css',
  71. 'css/colors.css',
  72. ]
  73. # Cross references
  74. extlinks = {
  75. "stdlib": ("https://docs.python.org/3/library/%s", None)
  76. }