diff --git a/assets/stylesheets/pages/_sphinx.scss b/assets/stylesheets/pages/_sphinx.scss
index 1ad24aa9..86744e33 100644
--- a/assets/stylesheets/pages/_sphinx.scss
+++ b/assets/stylesheets/pages/_sphinx.scss
@@ -10,6 +10,7 @@
.important { @extend %note-orange; }
.warning, .deprecated-removed, .deprecated { @extend %note-red; }
+ .hint { @extend %note-green; }
.versionmodified, span.title, .topic-title {
display: block;
diff --git a/lib/docs/filters/ansible/clean_html.rb b/lib/docs/filters/ansible/clean_html.rb
index f24d0d01..9cef4740 100644
--- a/lib/docs/filters/ansible/clean_html.rb
+++ b/lib/docs/filters/ansible/clean_html.rb
@@ -4,6 +4,10 @@ module Docs
def call
@doc = at_css('#page-content')
+ css('font').each do |node|
+ node.before(node.children).remove
+ end
+
doc
end
end
diff --git a/lib/docs/filters/ansible/entries.rb b/lib/docs/filters/ansible/entries.rb
index d6584cc1..d1097b99 100644
--- a/lib/docs/filters/ansible/entries.rb
+++ b/lib/docs/filters/ansible/entries.rb
@@ -11,6 +11,16 @@ module Docs
end
def get_type
+ if version == '2.4'
+ if slug.include?('module')
+ if name =~ /\A[a-z]/ && node = css('.toctree-l2.current').last
+ return "Modules: #{node.content.remove(' Modules')}"
+ else
+ return 'Modules'
+ end
+ end
+ end
+
if slug =~ /\Acli\//
'CLI Reference'
elsif slug =~ /\Anetwork\//
@@ -23,9 +33,9 @@ module Docs
end
elsif slug =~ /\Amodules\//
if slug =~ /\Amodules\/list_/ || slug=~ /_maintained\z/
- 'Modules'
+ 'Modules: Categories'
else
- 'Modules: Index'
+ 'Modules'
end
elsif slug.include?('playbook')
'Playbooks'
diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb
index 4c37e26d..2ac3ee6f 100644
--- a/lib/docs/scrapers/ansible.rb
+++ b/lib/docs/scrapers/ansible.rb
@@ -9,21 +9,6 @@ module Docs
html_filters.push 'ansible/entries', 'sphinx/clean_html', 'ansible/clean_html'
- options[:skip] = %w(
- installation_guide/index.html
- reference_appendices/glossary.html
- reference_appendices/faq.html
- reference_appendices/tower.html
- user_guide/quickstart.html
- modules/modules_by_category.html
- modules/list_of_all_modules.html)
-
- options[:skip_patterns] = [
- /\Acommunity.*/i,
- /\Adev_guide.*/i,
- /\Aroadmap.*/i,
- ]
-
options[:attribution] = <<-HTML
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
@@ -33,6 +18,34 @@ module Docs
version '2.5' do
self.release = '2.5.3'
self.base_url = 'https://docs.ansible.com/ansible/2.5/'
+
+ options[:skip] = %w(
+ installation_guide/index.html
+ reference_appendices/glossary.html
+ reference_appendices/faq.html
+ reference_appendices/tower.html
+ user_guide/quickstart.html
+ modules/modules_by_category.html
+ modules/list_of_all_modules.html)
+
+ options[:skip_patterns] = [
+ /\Acommunity.*/i,
+ /\Adev_guide.*/i,
+ /\Aroadmap.*/i,
+ ]
+ end
+
+ version '2.4' do
+ self.release = '2.4.3'
+ self.base_url = 'https://docs.ansible.com/ansible/2.4/'
+
+ options[:skip] = %w(
+ glossary.html
+ faq.html
+ community.html
+ tower.html
+ quickstart.html
+ list_of_all_modules.html)
end
end
end