conf.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. # http://www.sphinx-doc.org/en/master/config
  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 sys
  13. sys.path.insert(0, os.path.abspath('.'))
  14. import django
  15. import sphinx_py3doc_enhanced_theme
  16. sys.path.insert(0, os.path.abspath('../'))
  17. sys.path.insert(0, os.path.abspath('.'))
  18. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
  19. django.setup()
  20. # -- Project information -----------------------------------------------------
  21. project = 'ArchiveBox'
  22. copyright = '2019, Nick Sweeting'
  23. author = 'Nick Sweeting'
  24. # The full version, including alpha/beta/rc tags
  25. release = 'v0.4.0'
  26. # -- General configuration ---------------------------------------------------
  27. # Add any Sphinx extension module names here, as strings. They can be
  28. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  29. # ones.
  30. extensions = [
  31. 'sphinx.ext.autodoc',
  32. 'sphinx.ext.napoleon',
  33. 'sphinx.ext.viewcode',
  34. # 'sphinxcontrib.blockdiag'
  35. 'recommonmark'
  36. ]
  37. source_suffix = {
  38. '.rst': 'restructuredtext',
  39. '.txt': 'markdown',
  40. '.md': 'markdown',
  41. }
  42. master_doc = 'index'
  43. napoleon_google_docstring = True
  44. napoleon_use_param = True
  45. napoleon_use_ivar = False
  46. napoleon_use_rtype = True
  47. napoleon_include_special_with_doc = False
  48. # Add any paths that contain templates here, relative to this directory.
  49. templates_path = ['_templates']
  50. # List of patterns, relative to source directory, that match files and
  51. # directories to ignore when looking for source files.
  52. # This pattern also affects html_static_path and html_extra_path.
  53. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'data', 'output', 'templates', 'tests']
  54. # -- Options for HTML output -------------------------------------------------
  55. # The theme to use for HTML and HTML Help pages. See the documentation for
  56. # a list of builtin themes.
  57. #
  58. html_theme = 'sphinx_py3doc_enhanced_theme'
  59. html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()]
  60. texinfo_documents = [
  61. (master_doc, 'archivebox', 'archivebox Documentation',
  62. author, 'archivebox', 'The open-source self-hosted internet archive.',
  63. 'Miscellaneous'),
  64. ]
  65. html_theme_options = {
  66. 'githuburl': 'https://github.com/ionelmc/sphinx-py3doc-enhanced-theme/',
  67. 'bodyfont': '"Lucida Grande",Arial,sans-serif',
  68. 'headfont': '"Lucida Grande",Arial,sans-serif',
  69. 'codefont': '"Deja Vu Sans Mono",consolas,monospace,sans-serif',
  70. 'linkcolor': '#0072AA',
  71. 'visitedlinkcolor': '#6363bb',
  72. 'extrastyling': False,
  73. 'sidebarwide': True
  74. }
  75. pygments_style = 'friendly'
  76. # Add any paths that contain custom static files (such as style sheets) here,
  77. # relative to this directory. They are copied after the builtin static files,
  78. # so a file named "default.css" will overwrite the builtin "default.css".
  79. html_static_path = ['_static']
  80. man_pages = [
  81. (master_doc, 'archivebox', 'archivebox Documentation',
  82. [author], 1)
  83. ]