conf.py 3.0 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 = 'archivebox'
  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 = [
  54. '_build',
  55. 'Thumbs.db',
  56. '.DS_Store',
  57. 'data',
  58. 'output',
  59. 'templates',
  60. 'tests',
  61. 'migrations',
  62. ]
  63. # -- Options for HTML output -------------------------------------------------
  64. # The theme to use for HTML and HTML Help pages. See the documentation for
  65. # a list of builtin themes.
  66. #
  67. github_url = 'https://github.com/pirate/ArchiveBox'
  68. html_logo = '../themes/static/archive.png'
  69. html_theme = 'sphinx_rtd_theme'
  70. html_theme_options = {}
  71. texinfo_documents = [
  72. (master_doc, 'archivebox', 'archivebox Documentation',
  73. author, 'archivebox', 'The open-source self-hosted internet archive.',
  74. 'Miscellaneous'),
  75. ]
  76. pygments_style = 'friendly'
  77. # Add any paths that contain custom static files (such as style sheets) here,
  78. # relative to this directory. They are copied after the builtin static files,
  79. # so a file named "default.css" will overwrite the builtin "default.css".
  80. html_static_path = ['_static']
  81. man_pages = [
  82. (master_doc, 'archivebox', 'archivebox Documentation',
  83. [author], 1)
  84. ]