conf.py 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Godot Engine documentation build configuration file
  4. import sys
  5. import os
  6. # -- General configuration ------------------------------------------------
  7. needs_sphinx = '1.3'
  8. # Sphinx extension module names and templates location
  9. sys.path.append(os.path.abspath('extensions'))
  10. extensions = ['gdscript']
  11. templates_path = ['_templates']
  12. # You can specify multiple suffix as a list of string: ['.rst', '.md']
  13. source_suffix = '.rst'
  14. source_encoding = 'utf-8-sig'
  15. # The master toctree document
  16. master_doc = 'index'
  17. # General information about the project
  18. project = 'Godot Engine'
  19. copyright = '2014-2017, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)'
  20. author = 'Juan Linietsky, Ariel Manzur and the Godot community'
  21. # Version info for the project, acts as replacement for |version| and |release|
  22. # The short X.Y version
  23. version = 'latest'
  24. # The full version, including alpha/beta/rc tags
  25. release = 'latest'
  26. language = 'en'
  27. exclude_patterns = ['_build']
  28. from gdscript import GDScriptLexer
  29. from sphinx.highlighting import lexers
  30. lexers['gdscript'] = GDScriptLexer()
  31. # Pygments (syntax highlighting) style to use
  32. pygments_style = 'sphinx'
  33. highlight_language = 'gdscript'
  34. # -- Options for HTML output ----------------------------------------------
  35. # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
  36. on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
  37. import sphinx_rtd_theme
  38. html_theme = 'sphinx_rtd_theme'
  39. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  40. if on_rtd:
  41. using_rtd_theme = True
  42. # Theme options
  43. html_theme_options = {
  44. # 'typekit_id': 'hiw1hhg',
  45. # 'analytics_id': '',
  46. # 'sticky_navigation': True # Set to False to disable the sticky nav while scrolling.
  47. 'logo_only': True, # if we have a html_logo below, this shows /only/ the logo with no title text
  48. 'collapse_navigation': False, # Collapse navigation (False makes it tree-like)
  49. # 'display_version': True, # Display the docs version
  50. # 'navigation_depth': 4, # Depth of the headers shown in the navigation bar
  51. }
  52. html_logo = 'img/docs_logo.png'
  53. # Output file base name for HTML help builder
  54. htmlhelp_basename = 'GodotEnginedoc'
  55. # -- Options for reStructuredText parser ----------------------------------
  56. # Enable directives that insert the contents of external files
  57. file_insertion_enabled = False
  58. # -- Options for LaTeX output ---------------------------------------------
  59. # Grouping the document tree into LaTeX files. List of tuples
  60. # (source start file, target name, title,
  61. # author, documentclass [howto, manual, or own class]).
  62. latex_documents = [
  63. (master_doc, 'GodotEngine.tex', 'Godot Engine Documentation',
  64. 'Juan Linietsky, Ariel Manzur and the Godot community', 'manual'),
  65. ]