conf.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 = ['sphinx.ext.intersphinx', '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-2016, 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. # intersphinx configuration
  35. intersphinx_mapping = {
  36. 'english': ('http://docs.godotengine.org/en/latest/', None),
  37. }
  38. # -- Options for HTML output ----------------------------------------------
  39. # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
  40. on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
  41. if not on_rtd: # only import and set the theme if we're building docs locally
  42. import sphinx_rtd_theme
  43. html_theme = 'sphinx_rtd_theme'
  44. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  45. # Output file base name for HTML help builder
  46. htmlhelp_basename = 'GodotEnginedoc'
  47. # -- Options for reStructuredText parser ----------------------------------
  48. # Enable directives that insert the contents of external files
  49. file_insertion_enabled = False
  50. # -- Options for LaTeX output ---------------------------------------------
  51. # Grouping the document tree into LaTeX files. List of tuples
  52. # (source start file, target name, title,
  53. # author, documentclass [howto, manual, or own class]).
  54. latex_documents = [
  55. (master_doc, 'GodotEngine.tex', 'Godot Engine Documentation',
  56. 'Juan Linietsky, Ariel Manzur and the Godot community', 'manual'),
  57. ]