mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05: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>
This commit is contained in:
@@ -105,6 +105,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.write("#endif // VERSION_GENERATED_GEN_H\n")
|
||||
f.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user