Update Godot docs to include v4.2 and fix older version scraping #2201
+126
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds docs for Godot v4.2, and does some fixups for scraping older godot releases from the upstream website.
Godot 4.2 was released on Nov 2023: https://godotengine.org/article/godot-4-2-arrives-in-style/
Since v3.5, godot upstream docs have used some new HTML layouts and file structures. Since older versions still need to be scrapable, this introduces another set of versioned filters for godot.
This change also makes small changes to the filters to handle the current website markup for the previous godot doc versions.
The @GDscript and @globalscope entries can't currently be browsed, because of an encoding mismatch between the frontend and backend; I've identified a possible fix in #2200 .
checklist
SOURCE
file inpublic/icons/your_scraper_name/
are up-to-date if the documentation has a custom iconself.links
contains up-to-date urls ifself.links
is definedQA notes
I generated all of the godot doc versions that the scraper supports, and diffed them against the existing packaged versions to ensure as close of a match as possible.
Command to generate a local copy of the godot 4.2 docs:
bundle exec thor docs:generate [email protected]
Spot checks show that the main differences are:
class_@gdscript
andclass_@globalscope
filenames are escaped with%40
instead of@
. I have no idea how the previous packager got those files to be@
symbols, I suspect the godot website used to encode those differently.