[devdocsgjs/main: 416/1867] Improve Composer title page
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 416/1867] Improve Composer title page
- Date: Fri, 19 Nov 2021 23:47:14 +0000 (UTC)
commit 8e06630bf010db49ac3eda194918f323183179d9
Author: Nicolas Ettlin <nicolas ettlin me com>
Date: Mon Oct 1 21:31:13 2018 +0200
Improve Composer title page
lib/docs/filters/composer/clean_html.rb | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/lib/docs/filters/composer/clean_html.rb b/lib/docs/filters/composer/clean_html.rb
index b4abce49..54ce7a26 100644
--- a/lib/docs/filters/composer/clean_html.rb
+++ b/lib/docs/filters/composer/clean_html.rb
@@ -5,6 +5,16 @@ module Docs
# Remove unneeded elements
css('#searchbar, .toc, .fork-and-edit, .anchor').remove
+ # Fix the home page titles
+ if subpath == ''
+ css('h1').each do |node|
+ node.name = 'h2'
+ end
+
+ # Add a main title before the first subtitle
+ at_css('h2').before('<h1>Composer</h1>')
+ end
+
# Code blocks
css('pre').each do |node|
code = node.at_css('code[class]')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]