1
0

conf.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. # Ensure we get the local copy of tornado instead of what's on the standard path
  8. import os
  9. import sys
  10. sys.path.insert(0, os.path.abspath(".."))
  11. import pywebio
  12. version = release = pywebio.__version__
  13. # -- Project information -----------------------------------------------------
  14. project = 'PyWebIO'
  15. copyright = '2020, WangWeimin'
  16. author = 'WangWeimin'
  17. # -- General configuration ---------------------------------------------------
  18. # Add any Sphinx extension module names here, as strings. They can be
  19. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  20. # ones.
  21. extensions = [
  22. 'sphinx.ext.autodoc',
  23. # "sphinx.ext.intersphinx",
  24. "sphinx.ext.viewcode",
  25. ]
  26. primary_domain = "py"
  27. default_role = "py:obj"
  28. # intersphinx_mapping = {"python": ("https://docs.python.org/3.6/", None)}
  29. master_doc = 'index'
  30. # The language for content autogenerated by Sphinx. Refer to documentation
  31. # for a list of supported languages.
  32. #
  33. # This is also used if you do content translation via gettext catalogs.
  34. # Usually you set "language" from the command line for these cases.
  35. language = 'zh_CN'
  36. # List of patterns, relative to source directory, that match files and
  37. # directories to ignore when looking for source files.
  38. # This pattern also affects html_static_path and html_extra_path.
  39. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  40. # -- Options for HTML output -------------------------------------------------
  41. # The theme to use for HTML and HTML Help pages. See the documentation for
  42. # a list of builtin themes.
  43. #
  44. html_theme = "sphinx_rtd_theme"
  45. # -- Extension configuration -------------------------------------------------
  46. from sphinx.builders.html import StandaloneHTMLBuilder
  47. StandaloneHTMLBuilder.supported_image_types = [
  48. 'image/svg+xml',
  49. 'image/gif',
  50. 'image/png',
  51. 'image/jpeg'
  52. ]