conf.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # -*- coding: utf-8 -*-
  2. import sys, os
  3. from searx.version import VERSION_STRING
  4. from pallets_sphinx_themes import ProjectLink
  5. # Project --------------------------------------------------------------
  6. project = u'searx'
  7. copyright = u'2015-2019, Adam Tauber, Noémi Ványi'
  8. author = u'Adam Tauber'
  9. release, version = VERSION_STRING, VERSION_STRING
  10. # General --------------------------------------------------------------
  11. master_doc = "index"
  12. source_suffix = '.rst'
  13. extensions = [
  14. 'sphinx.ext.viewcode',
  15. "sphinx.ext.autodoc",
  16. "sphinx.ext.intersphinx",
  17. "pallets_sphinx_themes",
  18. "sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
  19. ]
  20. intersphinx_mapping = {
  21. "python": ("https://docs.python.org/3/", None),
  22. # "flask": ("https://flask.palletsprojects.com/", None),
  23. # "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
  24. # "jinja": ("https://jinja.palletsprojects.com/", None),
  25. }
  26. issues_github_path = "asciimoo/searx"
  27. # HTML -----------------------------------------------------------------
  28. sys.path.append(os.path.abspath('_themes'))
  29. html_theme_path = ['_themes']
  30. html_theme = "searx"
  31. html_theme_options = {"index_sidebar_logo": True}
  32. html_context = {
  33. "project_links": [
  34. ProjectLink("Source", os.environ.get("GIT_URL", "https://github.com/asciimoo")),
  35. ProjectLink("Wiki", "https://github.com/asciimoo/searx/wiki"),
  36. ProjectLink("Public instances", "https://github.com/asciimoo/searx/wiki/Searx-instances"),
  37. ProjectLink("Twitter", "https://twitter.com/Searx_engine"),
  38. ]
  39. }
  40. html_sidebars = {
  41. "**": ["project.html", "relations.html", "searchbox.html"],
  42. }
  43. singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
  44. html_static_path = ["static"]
  45. html_logo = "static/img/searx_logo_small.png"
  46. html_title = "Searx Documentation ({})".format("Searx-{}.tex".format(VERSION_STRING))
  47. html_show_sourcelink = False
  48. # LaTeX ----------------------------------------------------------------
  49. latex_documents = [
  50. (master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
  51. ]