|
|
@@ -5,59 +5,72 @@ module Docs
|
|
|
home: 'https://godotengine.org/',
|
|
|
code: 'https://github.com/godotengine/godot'
|
|
|
}
|
|
|
+ # godot docs since 3.5 don't link everything from the index.
|
|
|
+ self.initial_paths = %w[
|
|
|
+ getting_started/introduction/index.html
|
|
|
+ getting_started/step_by_step/index.html
|
|
|
+ classes/index.html
|
|
|
+ ]
|
|
|
|
|
|
- options[:container] = '.document .section'
|
|
|
-
|
|
|
+ options[:container] = '.document > [itemprop="articleBody"]'
|
|
|
options[:download_images] = false
|
|
|
- options[:only_patterns] = [/\Agetting_started\//, /\Aclasses\//]
|
|
|
+ options[:only_patterns] = [%r{\Agetting_started/}, %r{\Aclasses/}]
|
|
|
+
|
|
|
+ options[:attribution] = <<-HTML
|
|
|
+ © 2014–present Juan Linietsky, Ariel Manzur and the Godot community<br>
|
|
|
+ Licensed under the Creative Commons Attribution Unported License v3.0.
|
|
|
+ HTML
|
|
|
|
|
|
- options[:attribution] = ->(filter) do
|
|
|
- if filter.subpath.start_with?('classes')
|
|
|
- <<-HTML
|
|
|
- © 2014–2022 Juan Linietsky, Ariel Manzur, Godot Engine contributors<br>
|
|
|
- Licensed under the MIT License.
|
|
|
- HTML
|
|
|
- else
|
|
|
- <<-HTML
|
|
|
- © 2014–2022 Juan Linietsky, Ariel Manzur and the Godot community<br>
|
|
|
- Licensed under the Creative Commons Attribution Unported License v3.0.
|
|
|
- HTML
|
|
|
- end
|
|
|
+ version '4.2' do
|
|
|
+ self.release = '4.2.2'
|
|
|
+ self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
|
|
|
+ html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
|
|
|
end
|
|
|
|
|
|
version '3.5' do
|
|
|
- self.release = '3.5.1'
|
|
|
+ self.release = '3.5.3'
|
|
|
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
|
|
|
- options[:container] = '.document > [itemprop="articleBody"] > section[id]'
|
|
|
+
|
|
|
+ # godot 3.5 upstream docs are formatted like godot4
|
|
|
html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
|
|
|
end
|
|
|
|
|
|
version '3.4' do
|
|
|
self.release = '3.4.5'
|
|
|
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
|
|
|
+
|
|
|
options[:container] = '.document > [itemprop="articleBody"] > section[id]'
|
|
|
- html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
|
|
|
+ html_filters.push 'godot/entries_v3', 'godot/clean_html_v3', 'sphinx/clean_html'
|
|
|
end
|
|
|
|
|
|
version '3.3' do
|
|
|
self.release = '3.3.0'
|
|
|
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
|
|
|
- html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
|
|
|
+ self.initial_paths = %w[/index.html]
|
|
|
+
|
|
|
+ options[:only_patterns] = [%r{\Aclasses/}]
|
|
|
+ options[:container] = '.document .section'
|
|
|
+ html_filters.push 'godot/entries_v3', 'godot/clean_html_v3', 'sphinx/clean_html'
|
|
|
end
|
|
|
|
|
|
version '3.2' do
|
|
|
self.release = '3.2.3'
|
|
|
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
|
|
|
- html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
|
|
|
+ self.initial_paths = %w[/index.html]
|
|
|
+
|
|
|
+ options[:only_patterns] = [%r{\Aclasses/}]
|
|
|
+ options[:container] = '.document .section'
|
|
|
+ html_filters.push 'godot/entries_v3', 'godot/clean_html_v3', 'sphinx/clean_html'
|
|
|
end
|
|
|
|
|
|
version '2.1' do
|
|
|
self.release = '2.1.6'
|
|
|
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
|
|
|
+ self.initial_paths = %w[/index.html]
|
|
|
|
|
|
options[:skip] = %w(classes/class_@global\ scope.html)
|
|
|
- options[:only_patterns] = [/\Alearning\//, /\Aclasses\//]
|
|
|
-
|
|
|
+ options[:only_patterns] = [%r{\Alearning/}, %r{\Aclasses/}]
|
|
|
+ options[:container] = '.document .section'
|
|
|
html_filters.push 'godot/entries_v2', 'godot/clean_html_v2', 'sphinx/clean_html'
|
|
|
end
|
|
|
|