conf.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. from pallets_sphinx_themes import get_version
  2. from pallets_sphinx_themes import ProjectLink
  3. # Project --------------------------------------------------------------
  4. project = "MarkupSafe"
  5. copyright = "2010 Pallets Team"
  6. author = "Pallets Team"
  7. release, version = get_version("MarkupSafe")
  8. # General --------------------------------------------------------------
  9. master_doc = "index"
  10. extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "pallets_sphinx_themes"]
  11. intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
  12. # HTML -----------------------------------------------------------------
  13. html_theme = "flask"
  14. html_theme_options = {"index_sidebar_logo": False}
  15. html_context = {
  16. "project_links": [
  17. ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"),
  18. ProjectLink("Website", "https://palletsprojects.com/p/markupsafe/"),
  19. ProjectLink("PyPI releases", "https://pypi.org/project/MarkupSafe/"),
  20. ProjectLink("Source Code", "https://github.com/pallets/markupsafe/"),
  21. ProjectLink("Issue Tracker", "https://github.com/pallets/markupsafe/issues/"),
  22. ]
  23. }
  24. html_sidebars = {
  25. "index": ["project.html", "localtoc.html", "searchbox.html"],
  26. "**": ["localtoc.html", "relations.html", "searchbox.html"],
  27. }
  28. singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
  29. html_title = "MarkupSafe Documentation ({})".format(version)
  30. html_show_sourcelink = False
  31. # LaTeX ----------------------------------------------------------------
  32. latex_documents = [
  33. (master_doc, "MarkupSafe-{}.tex".format(version), html_title, author, "manual")
  34. ]