You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
5.0 KiB

5 years ago
5 years ago
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from os import path
  4. import sphinx_bootstrap_theme
  5. from recommonmark.parser import CommonMarkParser
  6. VERSION = ''
  7. CURRENT_DIRECTORY = path.abspath(path.dirname(__file__))
  8. with open(path.join(CURRENT_DIRECTORY, '..', 'VERSION')) as version_file:
  9. VERSION = version_file.read().strip()
  10. # -- General configuration ------------------------------------------------
  11. # If your documentation needs a minimal Sphinx version, state it here.
  12. #
  13. # needs_sphinx = '1.0'
  14. # Add any Sphinx extension module names here, as strings. They can be
  15. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  16. # ones.
  17. extensions = ['sphinx.ext.autodoc',
  18. 'sphinx.ext.todo',
  19. 'sphinx.ext.viewcode',
  20. 'sphinx.ext.napoleon']
  21. # Add any paths that contain templates here, relative to this directory.
  22. templates_path = ['_templates']
  23. # The suffix(es) of source filenames.
  24. # You can specify multiple suffix as a list of string:
  25. #
  26. # source_suffix = ['.rst', '.md']
  27. source_parsers = {
  28. '.md': CommonMarkParser,
  29. }
  30. source_suffix = ['.rst', '.md']
  31. # The master toctree document.
  32. master_doc = 'index'
  33. # General information about the project.
  34. project = 'nd2reader'
  35. copyright = '2017 - 2019, Ruben Verweij'
  36. author = 'Ruben Verweij'
  37. # The version info for the project you're documenting, acts as replacement for
  38. # |version| and |release|, also used in various other places throughout the
  39. # built documents.
  40. #
  41. # The short X.Y version.
  42. version = VERSION
  43. # The full version, including alpha/beta/rc tags.
  44. release = VERSION
  45. # The language for content autogenerated by Sphinx. Refer to documentation
  46. # for a list of supported languages.
  47. #
  48. # This is also used if you do content translation via gettext catalogs.
  49. # Usually you set "language" from the command line for these cases.
  50. language = 'en'
  51. # List of patterns, relative to source directory, that match files and
  52. # directories to ignore when looking for source files.
  53. # This patterns also effect to html_static_path and html_extra_path
  54. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  55. # The name of the Pygments (syntax highlighting) style to use.
  56. pygments_style = 'sphinx'
  57. # If true, `todo` and `todoList` produce output, else they produce nothing.
  58. todo_include_todos = True
  59. # -- Options for HTML output ----------------------------------------------
  60. # The theme to use for HTML and HTML Help pages. See the documentation for
  61. # a list of builtin themes.
  62. #
  63. html_theme = 'bootstrap'
  64. html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
  65. # Theme options are theme-specific and customize the look and feel of a theme
  66. # further. For a list of options available for each theme, see the
  67. # documentation.
  68. #
  69. html_theme_options = {
  70. 'navbar_links': [
  71. ("Lighthacking", "http://lighthacking.nl", True),
  72. ],
  73. }
  74. # Add any paths that contain custom static files (such as style sheets) here,
  75. # relative to this directory. They are copied after the builtin static files,
  76. # so a file named "default.css" will overwrite the builtin "default.css".
  77. html_static_path = []
  78. # -- Options for HTMLHelp output ------------------------------------------
  79. # Output file base name for HTML help builder.
  80. htmlhelp_basename = 'nd2readerdoc'
  81. # -- Options for LaTeX output ---------------------------------------------
  82. latex_elements = {
  83. # The paper size ('letterpaper' or 'a4paper').
  84. #
  85. # 'papersize': 'letterpaper',
  86. # The font size ('10pt', '11pt' or '12pt').
  87. #
  88. # 'pointsize': '10pt',
  89. # Additional stuff for the LaTeX preamble.
  90. #
  91. # 'preamble': '',
  92. # Latex figure (float) alignment
  93. #
  94. # 'figure_align': 'htbp',
  95. }
  96. # Grouping the document tree into LaTeX files. List of tuples
  97. # (source start file, target name, title,
  98. # author, documentclass [howto, manual, or own class]).
  99. latex_documents = [
  100. (master_doc, 'nd2reader.tex', 'nd2reader Documentation',
  101. 'Ruben Verweij', 'manual'),
  102. ]
  103. # -- Options for manual page output ---------------------------------------
  104. # One entry per manual page. List of tuples
  105. # (source start file, name, description, authors, manual section).
  106. man_pages = [
  107. (master_doc, 'nd2reader', 'nd2reader Documentation',
  108. [author], 1)
  109. ]
  110. # -- Options for Texinfo output -------------------------------------------
  111. # Grouping the document tree into Texinfo files. List of tuples
  112. # (source start file, target name, title, author,
  113. # dir menu entry, description, category)
  114. texinfo_documents = [
  115. (master_doc, 'nd2reader', 'nd2reader Documentation',
  116. author, 'nd2reader', 'One line description of project.',
  117. 'Miscellaneous'),
  118. ]
  119. # -- Options for Epub output ----------------------------------------------
  120. # Bibliographic Dublin Core info.
  121. epub_title = project
  122. epub_author = author
  123. epub_publisher = author
  124. epub_copyright = copyright
  125. # The unique identifier of the text. This can be a ISBN number
  126. # or the project homepage.
  127. #
  128. # epub_identifier = ''
  129. # A unique identification for the text.
  130. #
  131. # epub_uid = ''
  132. # A list of files that should not be packed into the epub file.
  133. epub_exclude_files = ['search.html']