conf.py 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. print(f"Root dir: {sys.path[0]}")
  15. # -- Project information -----------------------------------------------------
  16. project = 'redmail'
  17. copyright = '2022, Mikael Koli'
  18. author = 'Mikael Koli'
  19. # -- General configuration ---------------------------------------------------
  20. # Add any Sphinx extension module names here, as strings. They can be
  21. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  22. # ones.
  23. extensions = [
  24. 'sphinx.ext.doctest',
  25. 'sphinx.ext.autodoc',
  26. 'sphinx.ext.coverage',
  27. 'sphinx.ext.napoleon',
  28. 'sphinx.ext.extlinks',
  29. 'sphinx_copybutton',
  30. ]
  31. rst_prolog = """
  32. .. include:: <s5defs.txt>
  33. """
  34. # Extension settings
  35. napoleon_google_docstring = True
  36. napoleon_numpy_docstring = True
  37. autodoc_typehints = 'none'
  38. autodoc_member_order = 'bysource'
  39. # Add any paths that contain templates here, relative to this directory.
  40. #templates_path = ['_templates']
  41. # List of patterns, relative to source directory, that match files and
  42. # directories to ignore when looking for source files.
  43. # This pattern also affects html_static_path and html_extra_path.
  44. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  45. html_logo = "logo.png"
  46. html_theme_options = {
  47. "repository_url": "https://github.com/Miksus/red-mail",
  48. "use_repository_button": True,
  49. "repository_branch": "master",
  50. "use_issues_button": True,
  51. "use_download_button": True,
  52. "use_fullscreen_button": True,
  53. #"use_edit_page_button": True,
  54. "logo_only": True,
  55. }
  56. #html_sidebars = {}
  57. # -- Options for HTML output -------------------------------------------------
  58. # The theme to use for HTML and HTML Help pages. See the documentation for
  59. # a list of builtin themes.
  60. #
  61. html_title = "Red Mail"
  62. html_theme = 'sphinx_material'
  63. html_favicon = 'favicon.ico'
  64. # Add any paths that contain custom static files (such as style sheets) here,
  65. # relative to this directory. They are copied after the builtin static files,
  66. # so a file named "default.css" will overwrite the builtin "default.css".
  67. html_static_path = ['_static']
  68. html_css_files = [
  69. 'css/types.css',
  70. 'css/colors.css',
  71. ]
  72. html_sidebars = {
  73. "**": [
  74. "logo-text.html",
  75. "globaltoc.html",
  76. "localtoc.html",
  77. "searchbox.html"
  78. ]
  79. }
  80. html_theme_options = {
  81. 'nav_title': 'Red Mail',
  82. 'color_primary': 'red',
  83. 'color_accent': 'grey',
  84. 'repo_url': 'https://github.com/Miksus/red-mail/',
  85. 'repo_name': 'Red Mail',
  86. "repo_type": "github",
  87. # Visible levels of the global TOC; -1 means unlimited
  88. 'globaltoc_depth': 3,
  89. # If False, expand all TOC entries
  90. 'globaltoc_collapse': True,
  91. # If True, show hidden TOC entries
  92. 'globaltoc_includehidden': False,
  93. "html_minify": False,
  94. "html_prettify": False,
  95. "css_minify": True,
  96. "heroes": {
  97. "index": "Advanced email sending library.",
  98. },
  99. "nav_links": [
  100. ],
  101. }
  102. # Cross references
  103. extlinks = {
  104. "stdlib": ("https://docs.python.org/3/library/%s", None)
  105. }