conf.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. project = 'OpenLEADR'
  16. copyright = '2020, OpenLEADR Contributors'
  17. author = 'Stan Janssen'
  18. # The full version, including alpha/beta/rc tags
  19. with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')) as file:
  20. release = file.read().strip()
  21. print(release)
  22. # -- General configuration ---------------------------------------------------
  23. # Add any Sphinx extension module names here, as strings. They can be
  24. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  25. # ones.
  26. extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.apidoc']
  27. apidoc_module_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'openleadr')
  28. apidoc_excluded_paths = [os.path.join(apidoc_module_dir, 'service'),
  29. os.path.join(apidoc_module_dir, 'config.py')]
  30. # Add any paths that contain templates here, relative to this directory.
  31. templates_path = ['_templates']
  32. # List of patterns, relative to source directory, that match files and
  33. # directories to ignore when looking for source files.
  34. # This pattern also affects html_static_path and html_extra_path.
  35. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  36. autoclass_content = 'both'
  37. # -- Options for HTML output -------------------------------------------------
  38. # The theme to use for HTML and HTML Help pages. See the documentation for
  39. # a list of builtin themes.
  40. #
  41. html_theme = 'alabaster'
  42. # html_logo = 'logo-tall.png'
  43. html_theme_options = {
  44. 'logo': 'logo-tall.png',
  45. 'logo_name': False,
  46. 'github_user': 'openleadr',
  47. 'github_repo': 'openleadr-python',
  48. 'font_family': 'sans-serif',
  49. 'font_size': 8
  50. }
  51. # Add any paths that contain custom static files (such as style sheets) here,
  52. # relative to this directory. They are copied after the builtin static files,
  53. # so a file named "default.css" will overwrite the builtin "default.css".
  54. html_static_path = ['_static']