Skip to content

Commit 8e06630

Browse files
committed
Improve Composer title page
1 parent b98ab15 commit 8e06630

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/docs/filters/composer/clean_html.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ def call
55
# Remove unneeded elements
66
css('#searchbar, .toc, .fork-and-edit, .anchor').remove
77

8+
# Fix the home page titles
9+
if subpath == ''
10+
css('h1').each do |node|
11+
node.name = 'h2'
12+
end
13+
14+
# Add a main title before the first subtitle
15+
at_css('h2').before('<h1>Composer</h1>')
16+
end
17+
818
# Code blocks
919
css('pre').each do |node|
1020
code = node.at_css('code[class]')

0 commit comments

Comments
 (0)