conf.py 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 recommonmark
  13. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  14. # -- Project information -----------------------------------------------------
  15. project = 'PaddleX'
  16. copyright = '2020, paddlepaddle'
  17. author = 'paddlepaddle'
  18. # -- General configuration ---------------------------------------------------
  19. # Add any Sphinx extension module names here, as strings. They can be
  20. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  21. # ones.
  22. extensions = [
  23. 'sphinx.ext.autodoc',
  24. 'sphinx.ext.napoleon',
  25. 'sphinx.ext.coverage',
  26. 'sphinx.ext.viewcode',
  27. 'sphinx.ext.mathjax',
  28. 'sphinx.ext.githubpages',
  29. 'sphinx.ext.napoleon',
  30. 'recommonmark',
  31. 'sphinx_markdown_tables',
  32. ]
  33. # Add any paths that contain templates here, relative to this directory.
  34. templates_path = ['_templates']
  35. # md file can also be parased
  36. source_suffix = ['.rst', '.md']
  37. # The master toctree document.
  38. master_doc = 'index'
  39. # The language for content autogenerated by Sphinx. Refer to documentation
  40. # for a list of supported languages.
  41. #
  42. # This is also used if you do content translation via gettext catalogs.
  43. # Usually you set "language" from the command line for these cases.
  44. language = 'zh_CN'
  45. # -- Options for HTML output -------------------------------------------------
  46. # The theme to use for HTML and HTML Help pages. See the documentation for
  47. # a list of builtin themes.
  48. # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
  49. on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
  50. if not on_rtd: # only import and set the theme if we're building docs locally
  51. import sphinx_rtd_theme
  52. html_theme = 'sphinx_rtd_theme'
  53. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  54. # otherwise, readthedocs.org uses their theme by default, so no need to specify it
  55. # Add any paths that contain custom static files (such as style sheets) here,
  56. # relative to this directory. They are copied after the builtin static files,
  57. # so a file named "default.css" will overwrite the builtin "default.css".
  58. html_static_path = ['_static']
  59. html_logo = 'paddlex.png'