Skip to content

Commit a71f48e

Browse files
committed
Finish Bash scraper
1 parent 1d56144 commit a71f48e

File tree

10 files changed

+17
-15
lines changed

10 files changed

+17
-15
lines changed

assets/images/docs-2.png

440 Bytes
Loading

assets/images/[email protected]

1.02 KB
Loading

assets/javascripts/news.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
[
33
"2018-07-29",
4-
"New documentation: <a href=\"/pygame/\">Pygame</a>"
4+
"New documentations: <a href=\"/bash/\">Bash</a> and <a href=\"/pygame/\">Pygame</a>"
55
], [
66
"2018-07-08",
77
"New documentations: <a href=\"/leaflet/\">Leaflet</a>, <a href=\"/terraform/\">Terraform</a> and <a href=\"/koa/\">Koa</a>"

assets/stylesheets/global/_icons.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,4 @@
174174
._icon-leaflet:before { background-position: -3rem -3rem; @extend %doc-icon-2; }
175175
._icon-terraform:before { background-position: -4rem -3rem; @extend %doc-icon-2; }
176176
._icon-pygame:before { background-position: -5rem -3rem; @extend %doc-icon-2; }
177+
._icon-bash:before { background-position: -6rem -3rem; @extend %doc-icon-2; }

assets/stylesheets/pages/_bash.scss

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
._bash {
2-
// The page title is always the first element on the page, but not always the same type of element
3-
// The exception is the homepage, where the links element comes first
4-
> *:first-child:not(._links) {
5-
@extend h1;
6-
@extend %lined-heading;
7-
}
8-
92
dl > dt > code,
103
dl > dt > kbd {
11-
@extend %note, %note-blue;
12-
display: block;
13-
padding: 1px 7px 2px 7px;
14-
margin: 28px 0 14px 0;
15-
font-weight: bold;
16-
font-family: $baseFont;
4+
@extend %block-label, %label-blue;
175
}
186

197
th[align=left] {
20-
border-left: 1px solid #d8d8d8;
8+
border-left: 1px solid $boxBorder;
219
}
10+
11+
code { @extend %label; }
2212
}

lib/docs/filters/bash/clean_html.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def call
1111
# Remove chapter and section numbers from title
1212
title_node = at_css('h1, h2, h3, h4, h5, h6')
1313
title_node.content = title_node.content.gsub(/(\d+\.?)+/, '').strip
14+
title_node.name = 'h1'
1415

1516
# Remove the "D. " from names like "D. Concept Index" and "D. Function Index"
1617
title_node.content = title_node.content[3..-1] if title_node.content.start_with?("D. ")
@@ -56,6 +57,16 @@ def call
5657
node.children = link unless link.nil?
5758
end
5859

60+
css('tt', 'code', 'table').remove_attr('class')
61+
62+
css('tt').each do |node|
63+
node.name = 'code'
64+
end
65+
66+
css('pre').each do |node|
67+
node.content = node.content
68+
end
69+
5970
doc
6071
end
6172
end

public/icons/docs-2.pxm

34.1 KB
Binary file not shown.

public/icons/[email protected]

32.6 KB
Binary file not shown.

public/icons/docs/bash/16.png

-939 Bytes
Loading
-1.03 KB
Loading

0 commit comments

Comments
 (0)