conf.py 2.5 KB

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