conf.py 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. # -*- coding: utf-8 -*-
  2. #
  3. # pagure documentation build configuration file, created by
  4. # sphinx-quickstart on Wed Mar 1 10:30:13 2015.
  5. #
  6. # This file is execfile()d with the current directory set to its containing
  7. # dir.
  8. #
  9. # Note that not all possible configuration values are present in this
  10. # autogenerated file.
  11. #
  12. # All configuration values have a default; values that are commented out
  13. # serve to show the default.
  14. import os
  15. import re
  16. pagurefile = os.path.join(
  17. os.path.dirname(__file__), "..", "pagure", "__init__.py"
  18. )
  19. # Thanks to SQLAlchemy:
  20. # https://github.com/zzzeek/sqlalchemy/blob/master/setup.py#L104
  21. with open(pagurefile) as stream:
  22. VERSION = (
  23. re.compile(r".*__version__ = \"(.*?)\"", re.S)
  24. .match(stream.read())
  25. .group(1)
  26. )
  27. # If extensions (or modules to document with autodoc) are in another
  28. # directory, add these directories to sys.path here. If the directory is
  29. # relative to the documentation root, use os.path.abspath to make it
  30. # absolute, like shown here.
  31. # sys.path.insert(0, os.path.abspath('.'))
  32. # -- General configuration ------------------------------------------------
  33. # If your documentation needs a minimal Sphinx version, state it here.
  34. # needs_sphinx = '1.0'
  35. # Add any Sphinx extension module names here, as strings. They can be
  36. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  37. extensions = [
  38. "sphinx.ext.autodoc",
  39. "sphinx.ext.coverage",
  40. "sphinx.ext.viewcode",
  41. ]
  42. # Add any paths that contain templates here, relative to this directory.
  43. templates_path = ["_templates"]
  44. # The suffix of source filenames.
  45. source_suffix = ".rst"
  46. # The encoding of source files.
  47. # source_encoding = 'utf-8-sig'
  48. # The master toctree document.
  49. master_doc = "index"
  50. # General information about the project.
  51. project = u"pagure"
  52. copyright = u"2015, Red Hat Inc, Pierre-Yves Chibon <pingou@pingoured.fr>"
  53. # The version info for the project you're documenting, acts as replacement
  54. # for |version| and |release|, also used in various other places throughout
  55. # the built documents.
  56. #
  57. # The short X.Y version.
  58. # version = __version__
  59. version = VERSION
  60. # The full version, including alpha/beta/rc tags.
  61. # release = '1'
  62. # The language for content autogenerated by Sphinx. Refer to documentation
  63. # for a list of supported languages.
  64. # language = None
  65. # There are two options for replacing |today|: either, you set today to some
  66. # non-false value, then it is used:
  67. # today = ''
  68. # Else, today_fmt is used as the format for a strftime call.
  69. # today_fmt = '%B %d, %Y'
  70. # List of patterns, relative to source directory, that match files and
  71. # directories to ignore when looking for source files.
  72. exclude_patterns = ["_build"]
  73. # The reST default role (used for this markup: `text`) to use for all
  74. # documents.
  75. # default_role = None
  76. # If true, '()' will be appended to :func: etc. cross-reference text.
  77. # add_function_parentheses = True
  78. # If true, the current module name will be prepended to all description
  79. # unit titles (such as .. function::).
  80. # add_module_names = True
  81. # If true, sectionauthor and moduleauthor directives will be shown in the
  82. # output. They are ignored by default.
  83. # show_authors = False
  84. # The name of the Pygments (syntax highlighting) style to use.
  85. pygments_style = "sphinx"
  86. # A list of ignored prefixes for module index sorting.
  87. # modindex_common_prefix = []
  88. # -- Options for HTML output ----------------------------------------------
  89. import cloud_sptheme as csp
  90. html_style = "site.css"
  91. # The theme to use for HTML and HTML Help pages. See the documentation for
  92. # a list of builtin themes.
  93. # html_theme = 'default'
  94. html_theme = "cloud"
  95. # Theme options are theme-specific and customize the look and feel of a theme
  96. # further. For a list of options available for each theme, see the
  97. # documentation.
  98. # html_theme_options = {}
  99. html_theme_options = {
  100. "sidebarwidth": "200px",
  101. "max_width": "900px",
  102. "compact_width": "800px",
  103. "minimal_width": "700px",
  104. # Style it like Fedora..
  105. "bodyfont": "Cantarell",
  106. "highlightcolor": "#79db32", # First Green
  107. "sidebarbgcolor": "#FEFEFE",
  108. "sidebartrimcolor": "#FEFEFE",
  109. "sectionbgcolor": "#FEFEFE",
  110. "sectiontrimcolor": "#FEFEFE",
  111. "sectiontextcolor": "#444444",
  112. "relbarbgcolor": "#FEFEFE",
  113. "relbartextcolor": "#444444",
  114. "relbarlinkcolor": "#444444",
  115. "bgcolor": "#FEFEFE",
  116. "textcolor": "#444444",
  117. # "linkcolor": "#79db32", # First Green
  118. "linkcolor": "#00009d",
  119. "headtextcolor": "#444444",
  120. "headlinkcolor": "#444444",
  121. # "codebgcolor"
  122. # "codetextcolor"
  123. "codetrimcolor": "#79db32", # First Green
  124. "footerbgcolor": "#FEFEFE",
  125. "fontcssurl": "_static/site.css",
  126. }
  127. # Add any paths that contain custom themes here, relative to this directory.
  128. # html_theme_path = []
  129. html_theme_path = [csp.get_theme_dir()]
  130. # The name for this set of Sphinx documents. If None, it defaults to
  131. # "<project> v<release> documentation".
  132. # html_title = None
  133. # A shorter title for the navigation bar. Default is the same as html_title.
  134. # html_short_title = None
  135. # The name of an image file (relative to this directory) to place at the top
  136. # of the sidebar.
  137. # html_logo = None
  138. # The name of an image file (within the static path) to use as favicon of the
  139. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  140. # pixels large.
  141. # html_favicon = None
  142. # Add any paths that contain custom static files (such as style sheets) here,
  143. # relative to this directory. They are copied after the builtin static files,
  144. # so a file named "default.css" will overwrite the builtin "default.css".
  145. html_static_path = ["_static"]
  146. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  147. # using the given strftime format.
  148. # html_last_updated_fmt = '%b %d, %Y'
  149. # If true, SmartyPants will be used to convert quotes and dashes to
  150. # typographically correct entities.
  151. # html_use_smartypants = True
  152. # Custom sidebar templates, maps document names to template names.
  153. html_sidebars = {
  154. "**": [
  155. "pagure-logo.html",
  156. "localtoc.html",
  157. "relations.html",
  158. "sourcelink.html",
  159. "searchbox.html",
  160. ]
  161. }
  162. # Additional templates that should be rendered to pages, maps page names to
  163. # template names.
  164. # html_additional_pages = {}
  165. # If false, no module index is generated.
  166. # html_domain_indices = True
  167. # If false, no index is generated.
  168. # html_use_index = True
  169. # If true, the index is split into individual pages for each letter.
  170. # html_split_index = False
  171. # If true, links to the reST sources are added to the pages.
  172. # html_show_sourcelink = True
  173. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  174. # html_show_sphinx = True
  175. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  176. # html_show_copyright = True
  177. # If true, an OpenSearch description file will be output, and all pages will
  178. # contain a <link> tag referring to it. The value of this option must be the
  179. # base URL from which the finished HTML is served.
  180. # html_use_opensearch = ''
  181. # This is the file name suffix for HTML files (e.g. ".xhtml").
  182. # html_file_suffix = None
  183. # Output file base name for HTML help builder.
  184. htmlhelp_basename = "pagure"
  185. # -- Options for LaTeX output ---------------------------------------------
  186. latex_elements = {
  187. # The paper size ('letterpaper' or 'a4paper').
  188. #'papersize': 'letterpaper',
  189. # The font size ('10pt', '11pt' or '12pt').
  190. #'pointsize': '10pt',
  191. # Additional stuff for the LaTeX preamble.
  192. #'preamble': '',
  193. }
  194. # Grouping the document tree into LaTeX files. List of tuples
  195. # (source start file, target name, title, author, documentclass
  196. # [howto/manual]).
  197. latex_documents = [
  198. (
  199. "index",
  200. "pagure.tex",
  201. u"Pagure Documentation",
  202. u"Pierre-Yves Chibon \\textless{}pingou@pingoured.fr\\textgreater{}",
  203. "manual",
  204. )
  205. ]
  206. # The name of an image file (relative to this directory) to place at the top of
  207. # the title page.
  208. # latex_logo = None
  209. # For "manual" documents, if this is true, then toplevel headings are parts,
  210. # not chapters.
  211. # latex_use_parts = False
  212. # If true, show page references after internal links.
  213. # latex_show_pagerefs = False
  214. # If true, show URL addresses after external links.
  215. # latex_show_urls = False
  216. # Documents to append as an appendix to all manuals.
  217. # latex_appendices = []
  218. # If false, no module index is generated.
  219. # latex_domain_indices = True
  220. # -- Options for manual page output ---------------------------------------
  221. # One entry per manual page. List of tuples
  222. # (source start file, name, description, authors, manual section).
  223. man_pages = [
  224. (
  225. "index",
  226. "pagure",
  227. u"Pagure Documentation",
  228. [u"Pierre-Yves Chibon <pingou@pingoured.fr>"],
  229. 1,
  230. )
  231. ]
  232. # If true, show URL addresses after external links.
  233. # man_show_urls = False
  234. # -- Options for Texinfo output -------------------------------------------
  235. # Grouping the document tree into Texinfo files. List of tuples
  236. # (source start file, target name, title, author,
  237. # dir menu entry, description, category)
  238. texinfo_documents = [
  239. (
  240. "index",
  241. "pagure",
  242. u"Pagure Documentation",
  243. u"Pierre-Yves Chibon <pingou@pingoured.fr>",
  244. "pagure",
  245. "Small git-centric forge",
  246. "Miscellaneous",
  247. )
  248. ]
  249. # Documents to append as an appendix to all manuals.
  250. # texinfo_appendices = []
  251. # If false, no module index is generated.
  252. # texinfo_domain_indices = True
  253. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  254. # texinfo_show_urls = 'footnote'