mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-23 03:05:32 +02:00
docs(rtd): move documentation to read the docs
This commit is contained in:
parent
0bd0d39f41
commit
bc15d8950f
44 changed files with 580 additions and 752 deletions
65
docs/conf.py
Normal file
65
docs/conf.py
Normal file
|
@ -0,0 +1,65 @@
|
|||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import os
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = 'GodotXterm'
|
||||
copyright = '2024, Leroy Hopson'
|
||||
author = 'Leroy Hopson'
|
||||
godot_version = '3.5'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = ['myst_parser', 'sphinx_rtd_theme']
|
||||
myst_enable_extensions = ['colon_fence', 'substitution']
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
current_branch = os.getenv('CURRENT_BRANCH', 'main')
|
||||
godot_class = 'https://docs.godotengine.org/en/' + godot_version + '/classes/class_{}'
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
html_static_path = ['_static']
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_options = {
|
||||
'logo_only': True
|
||||
}
|
||||
html_logo = '_static/images/logo.png'
|
||||
|
||||
myst_substitutions = {
|
||||
'repo': 'https://github.com/lihop/godot-xterm/blob/{}'.format(current_branch),
|
||||
'godot_docs': 'https://docs.godotengine.org/en/' + godot_version,
|
||||
|
||||
'PTY': '[PTY](/api/pty.md)',
|
||||
'Terminal': '[Terminal](/api/terminal.md)',
|
||||
|
||||
# Godot classes.
|
||||
'AudioStream': '[AudioStream](' + godot_class.format('audiostream.html') + ')',
|
||||
'CanvasItem': '[CanvasItem](' + godot_class.format('canvasitem.html') + ')',
|
||||
'Color': '[Color](' + godot_class.format('color.html') + ')',
|
||||
'Control': '[Control](' + godot_class.format('control.html') + ')',
|
||||
'Error': '[Error](' + godot_class.format('%40globalscope.html#enum-globalscope-error') + ')',
|
||||
'Font': '[Font](' + godot_class.format('font.html') + ')',
|
||||
'InputEventKey': '[InputEventKey](' + godot_class.format('inputeventkey.html') + ')',
|
||||
'Node': '[Node](' + godot_class.format('node.html') + ')',
|
||||
'NodePath': '[NodePath](' + godot_class.format('nodepath.html') + ')',
|
||||
'Object': '[Object](' + godot_class.format('object.html') + ')',
|
||||
'OK': '[OK](' + godot_class.format('%40globalscope.html#class-globalscope-constant-ok') + ')',
|
||||
'PoolByteArray': '[PoolByteArray](' + godot_class.format('poolbytearray.html') + ')',
|
||||
'PoolStringArray': '[PoolStringArray](' + godot_class.format('poolstringarray.html') + ')',
|
||||
'String': '[String](' + godot_class.format('string.html') + ')',
|
||||
'Vector2': '[Vector2](' + godot_class.format('vector2.html') + ')',
|
||||
'bool': '[bool](' + godot_class.format('bool.html') + ')',
|
||||
'float': '[float](' + godot_class.format('float.html') + ')',
|
||||
'int': '[int](' + godot_class.format('int.html') + ')',
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue