Skip to content

Commit b4cd5f1

Browse files
committed
Finish Terraform scraper
1 parent 716fc26 commit b4cd5f1

File tree

12 files changed

+14
-3
lines changed

12 files changed

+14
-3
lines changed

assets/images/docs-2.png

270 Bytes
Loading

assets/images/[email protected]

483 Bytes
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-08",
4-
"New documentation: <a href=\"/leaflet/\">Leaflet</a>"
4+
"New documentations: <a href=\"/leaflet/\">Leaflet</a>, <a href=\"/terraform/\">Terraform</a>"
55
], [
66
"2018-03-26",
77
"DevDocs is joining the freeCodeCamp community. Read the announcement <a href=\"https://medium.freecodecamp.org/devdocs-is-joining-the-freecodecamp-community-ae185a1c14a6\" target=\"_blank\">here</a>."

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,11 @@ credits = [
645645
'2018 The TensorFlow Authors',
646646
'CC BY',
647647
'https://creativecommons.org/licenses/by/3.0/'
648+
], [
649+
'Terraform',
650+
'2018 HashiCorp',
651+
'MPL',
652+
'https://raw.githubusercontent.com/hashicorp/terraform-website/master/LICENSE.md'
648653
], [
649654
'Twig',
650655
'2009-2017 The Twig Team',

assets/stylesheets/application-dark.css.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
'pages/support_tables',
9797
'pages/tcl_tk',
9898
'pages/tensorflow',
99+
'pages/terraform',
99100
'pages/underscore',
100101
'pages/vue',
101102
'pages/webpack',

assets/stylesheets/global/_icons.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,4 @@
171171
._icon-jekyll:before { background-position: -1rem -3rem; @extend %doc-icon-2; }
172172
._icon-babel:before { background-position: -2rem -3rem; @extend %doc-icon-2; }
173173
._icon-leaflet:before { background-position: -3rem -3rem; @extend %doc-icon-2; }
174+
._icon-terraform:before { background-position: -4rem -3rem; @extend %doc-icon-2; }

lib/docs/filters/terraform/clean_html.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ def call
1919
node['data-language'] = 'ruby'
2020
end
2121
node.content = node.content
22+
node.remove_attribute('class')
23+
end
24+
25+
css('.highlight').each do |node|
26+
node.before(node.children).remove
2227
end
2328

2429
doc

lib/docs/scrapers/terraform.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ class Terraform < UrlScraper
44
self.type = 'terraform'
55
self.release = '0.11.7'
66
self.base_url = 'https://www.terraform.io/docs/'
7-
# self.dir = '/mnt/c/Users/Doug/Code/terraform-docs/www.terraform.io/docs'
87
self.root_path = 'index.html'
98
self.links = {
109
home: 'https://www.terraform.io/',
@@ -16,7 +15,7 @@ class Terraform < UrlScraper
1615
options[:skip_patterns] = [/enterprise/, /enterprise-legacy/]
1716

1817
options[:attribution] = <<-HTML
19-
Copyright &copy; 2018 HashiCorp</br>
18+
&copy; 2018 HashiCorp</br>
2019
Licensed under the MPL 2.0 License.
2120
HTML
2221
end

public/icons/docs-2.pxm

33.7 KB
Binary file not shown.

public/icons/[email protected]

35.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)