mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Allow dehardcoding documentation branch and URL in docs links
This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.
In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.
The documentation branch string is set in `version.py`.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
(cherry picked from commit 5341e6010e
)
This commit is contained in:
parent
175870ccc7
commit
0cdcf1154f
6 changed files with 40 additions and 30 deletions
|
@ -88,6 +88,8 @@ def update_version(module_version_string=""):
|
|||
f.write('#define VERSION_MODULE_CONFIG "' + str(version.module_config) + module_version_string + '"\n')
|
||||
f.write("#define VERSION_YEAR " + str(version.year) + "\n")
|
||||
f.write('#define VERSION_WEBSITE "' + str(version.website) + '"\n')
|
||||
f.write('#define VERSION_DOCS_BRANCH "' + str(version.docs) + '"\n')
|
||||
f.write('#define VERSION_DOCS_URL "https://docs.godotengine.org/en/" VERSION_DOCS_BRANCH\n')
|
||||
f.close()
|
||||
|
||||
# NOTE: It is safe to generate this file here, since this is still executed serially
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue