Showing the changes to lib/docs (2 of 3 files). Show all
Unified · Split
| @@ -3,14 +3,11 @@ module Docs · 2 unmodified lines | |||
| 3 | class Sanctuary | 3 | class Sanctuary |
| 4 | class CleanHtmlFilter < Filter | 4 | class CleanHtmlFilter < Filter |
| 5 | def call | 5 | def call |
| 6 | # Remove header containing GitHub, Gitter, and Stack Overflow links. | ||
| 7 | doc.at("#css-header").unlink() | ||
| 8 | |||
| 9 | # Remove redundant section links from table of contents. | 6 | # Remove redundant section links from table of contents. |
| 10 | doc.at("a[href='#section:api']").next_element.unlink() | 7 | doc.at("a[href='#section:api']").next_element.unlink() |
| 11 | 8 | ||
| 12 | # Swap headings and accompanying pilcrows to aid positioning via CSS. | 9 | # Remove pilcrows. |
| 13 | doc.css(".pilcrow").each { |node| node.next_element.after(node) } | 10 | doc.css(".pilcrow").remove() |
| 14 | 11 | ||
| 15 | # Insert Fink link in place of logo. | 12 | # Insert Fink link in place of logo. |
| 16 | doc.at("[id='section:sponsors'] ~ ul > li > p").prepend_child( | 13 | doc.at("[id='section:sponsors'] ~ ul > li > p").prepend_child( |
| @@ -11,9 +11,9 @@ module Docs · 10 unmodified lines | |||
| 11 | code: "https://github.com/sanctuary-js/sanctuary", | 11 | code: "https://github.com/sanctuary-js/sanctuary", |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | html_filters.push("sanctuary/entries") | 14 | html_filters.push "sanctuary/entries", "sanctuary/clean_html" |
| 15 | html_filters.push("sanctuary/clean_html") | ||
| 16 | 15 | ||
| 16 | options[:container] = '#css-main' | ||
| 17 | options[:title] = "Sanctuary" | 17 | options[:title] = "Sanctuary" |
| 18 | options[:attribution] = "Licensed under the MIT License." | 18 | options[:attribution] = "Licensed under the MIT License." |
| 19 | 19 | ||