middleman-hashicorp 0.3.35 → 0.3.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2c7a885e60c254c12acb316b53cabc7717496ba1f983da5d58ba6b945c069ac
4
- data.tar.gz: 7f9a6224170edaed847f424251ea2655a73dac302b48d43ee3ecd622df623821
3
+ metadata.gz: 04d8b35b212ee6ca03b20cadc7609dff3721bfe9782ba67e5900464fdf510ee1
4
+ data.tar.gz: 6e8514c78339f9512a0712d58e6fcdd0133cfc0b89b2535af23539bd563633dc
5
5
  SHA512:
6
- metadata.gz: 8534412acabb03191b17a3468273b661d9fdcecc615b0c233a523a0d3658819879ed0ca6fcb4d0ddb50f4bddae4588862f8221403718e88603471d77ca611148
7
- data.tar.gz: e3bccac8d724eb0c7fd5caef1cae6eb7f8c1b26c873ccd21dcedf1f74aa66ba934d5661e08358f64fe28ce7c77257e616393fcf4e086b65230b001509ce0f636
6
+ metadata.gz: f27b4368499002f2ee5b6c00342c6c13232f8d6066d1b9b12fdc82c948c6af3aa164fb121d24c4057cbbc75db5302929b8dcc1e328997f73581ec6d475be7773
7
+ data.tar.gz: 6fd4cd3c9fec357693e29235c4b81725c43713e4629b86309c58be00bfa8ed1d80705cf4bbc681eee4cb72b209d61286315fe6f849620db40856c04ae516c3bc
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
- HashiCorp Middleman Customizations
2
- ==================================
1
+ # HashiCorp Middleman Customizations
2
+
3
3
  A wrapper around [Middleman][] for HashiCorp's customizations.
4
4
 
5
- Installation
6
- ------------
5
+ ## Installation
6
+
7
7
  Add this line to the Gemfile:
8
8
 
9
9
  ```ruby
@@ -16,9 +16,8 @@ And then run:
16
16
  $ bundle
17
17
  ```
18
18
 
19
+ ## Usage
19
20
 
20
- Usage
21
- -----
22
21
  To generate a new site, follow the instructions in the [Middleman docs][]. Then add the following line to your `config.rb`:
23
22
 
24
23
  ```ruby
@@ -52,20 +51,21 @@ $ middleman server
52
51
 
53
52
  and you are off running!
54
53
 
55
- Customizations
56
- --------------
54
+ ## Customizations
55
+
57
56
  ### Default Options
58
- - Syntax highlighting (via [middleman-syntax][]) is automatically enabled
59
- - Asset directories are organized like Rails:
60
- - `assets/stylesheets`
61
- - `assets/javascripts`
62
- - `assets/images`
63
- - `assets/fonts`
64
- - The Markdown engine is redcarpet (see the section below on Markdown customizations)
65
- - During development, live-reload is automatically enabled
66
- - During build, css, javascript and HTML are minified
67
- - During build, assets are hashed
68
- - During build, gzipped assets are also created
57
+
58
+ * Syntax highlighting (via [middleman-syntax][]) is automatically enabled
59
+ * Asset directories are organized like Rails:
60
+ * `assets/stylesheets`
61
+ * `assets/javascripts`
62
+ * `assets/images`
63
+ * `assets/fonts`
64
+ * The Markdown engine is redcarpet (see the section below on Markdown customizations)
65
+ * During development, live-reload is automatically enabled
66
+ * During build, css, javascript and HTML are minified
67
+ * During build, assets are hashed
68
+ * During build, gzipped assets are also created
69
69
 
70
70
  ### IE Compatibility
71
71
 
@@ -150,6 +150,7 @@ Finally include the required javascript:
150
150
  ```
151
151
 
152
152
  ### Mega Nav
153
+
153
154
  HashiCorp has a consistent mega-nav used across all project sites. This is insertable into any document using the following:
154
155
 
155
156
  ```erb
@@ -165,51 +166,54 @@ Additionally, you must import the CSS and Javascript:
165
166
 
166
167
  ```scss
167
168
  // assets/stylesheets/application.scss
168
- @import 'hashicorp/mega-nav'
169
+ @import 'hashicorp/mega-nav';
169
170
  ```
170
171
 
171
172
  ### Helpers
172
- - `latest_version` - get the version specified in `config.rb` as `version`, but replicated here for use in views.
173
173
 
174
- ```ruby
175
- latest_version #=> "1.0.0"
176
- ```
174
+ * `latest_version` - get the version specified in `config.rb` as `version`, but replicated here for use in views.
175
+
176
+ ```ruby
177
+ latest_version #=> "1.0.0"
178
+ ```
177
179
 
178
- - `system_icon` - use vendored image assets for a system icon
180
+ * `system_icon` - use vendored image assets for a system icon
179
181
 
180
- ```ruby
181
- system_icon(:windows) #=> "<img src=\"/images/icons/....png\">"
182
- ```
182
+ ```ruby
183
+ system_icon(:windows) #=> "<img src=\"/images/icons/....png\">"
184
+ ```
183
185
 
184
- - `pretty_os` - get the human name of the given operating system
186
+ * `pretty_os` - get the human name of the given operating system
185
187
 
186
- ```ruby
187
- pretty_os(:darwin) => "Mac OS X"
188
- ```
188
+ ```ruby
189
+ pretty_os(:darwin) => "Mac OS X"
190
+ ```
189
191
 
190
- - `pretty_arch` - get the arch out of an arch
192
+ * `pretty_arch` - get the arch out of an arch
191
193
 
192
- ```ruby
193
- pretty_arch(:amd64) #=> "64-bit"
194
- ```
194
+ ```ruby
195
+ pretty_arch(:amd64) #=> "64-bit"
196
+ ```
195
197
 
196
198
  ### Markdown
199
+
197
200
  This extension extends the redcarpet markdown processor to add some additional features:
198
201
 
199
- - Autolinking of URLs
200
- - Fenced code blocks
201
- - Tables
202
- - TOC data
203
- - Strikethrough
204
- - Superscript
202
+ * Autolinking of URLs
203
+ * Fenced code blocks
204
+ * Tables
205
+ * TOC data
206
+ * Strikethrough
207
+ * Superscript
205
208
 
206
209
  In addition to "standard markdown", the custom markdown parser supports the following:
207
210
 
208
211
  #### Auto-linking Anchor Tags
212
+
209
213
  Since the majority of HashiCorp's projects use the following syntax to define APIs, this extension automatically converts those to named anchor links:
210
214
 
211
215
  ```markdown
212
- - `api_method` - description
216
+ * `api_method` - description
213
217
  ```
214
218
 
215
219
  Outputs:
@@ -226,12 +230,13 @@ Header links will automatically generate linkable hrefs on hover. This can be us
226
230
 
227
231
  ```scss
228
232
  // assets/stylesheets/application.scss
229
- @import 'hashicorp/anchor-links'
233
+ @import 'hashicorp/anchor-links';
230
234
  ```
231
235
 
232
236
  Any special characters are converted to an underscore (`_`).
233
237
 
234
238
  #### Recursive Markdown Rendering
239
+
235
240
  By default, the Markdown spec does not call for rendering markdown recursively inside of HTML. With this extension, it is valid:
236
241
 
237
242
  ```markdown
@@ -241,12 +246,13 @@ By default, the Markdown spec does not call for rendering markdown recursively i
241
246
  ```
242
247
 
243
248
  #### Bootstrap Alerts
249
+
244
250
  There are 4 custom markdown extensions that automatically create Twitter Bootstrap-style alerts:
245
251
 
246
- - `=>` => `success`
247
- - `->` => `info`
248
- - `~>` => `warning`
249
- - `!>` => `danger`
252
+ * `=>` => `success`
253
+ * `->` => `info`
254
+ * `~>` => `warning`
255
+ * `!>` => `danger`
250
256
 
251
257
  ```markdown
252
258
  -> Hey, you should know...
@@ -271,6 +277,7 @@ Of course you can use Markdown inside the block:
271
277
  ```
272
278
 
273
279
  ### Bootstrap
280
+
274
281
  Twitter Bootstrap (3.x) is automatically bundled. Simply activate it it in your CSS and Javascript:
275
282
 
276
283
  ```scss
@@ -283,15 +290,18 @@ Twitter Bootstrap (3.x) is automatically bundled. Simply activate it it in your
283
290
  //= require bootstrap
284
291
  ```
285
292
 
286
- Contributing
287
- ------------
293
+ ## Publishing a New Release
294
+
295
+ Just bump the version string and push a new tag to the repository and our CI will release the gem automatically. Do not try running any of the Makefile tasks yourself, the CI will run them for you.
296
+
297
+ ## Contributing
298
+
288
299
  1. [Fork it](https://github.com/hashicorp/middleman-hashicorp/fork)
289
300
  2. Create your feature branch (`git checkout -b my-new-feature`)
290
301
  3. Commit your changes (`git commit -am 'Add some feature'`)
291
302
  4. Push to the branch (`git push origin my-new-feature`)
292
303
  5. Create a new Pull Request
293
304
 
294
-
295
- [Middleman]: http://middlemanapp.com/
296
- [Middleman docs]: http://middlemanapp.com/basics/getting-started/
305
+ [middleman]: http://middlemanapp.com/
306
+ [middleman docs]: http://middlemanapp.com/basics/getting-started/
297
307
  [middleman-syntax]: http://github.com/middleman/middleman-syntax/
@@ -69,10 +69,15 @@ class Middleman::HashiCorp::RedcarpetHTML < ::Middleman::Renderers::MiddlemanRed
69
69
 
70
70
  if md = raw.match(/\<(.+?)\>(.*)\<(\/.+?)\>/m)
71
71
  open_tag, content, close_tag = md.captures
72
- "<#{open_tag}>\n#{recursive_render(content)}<#{close_tag}>"
73
- else
74
- raw
72
+ rendered_content = recursive_render(content)
73
+ # If the recursive render did more than simply wrap
74
+ # the content within a paragraph, assume this is valid
75
+ # markdown content and return the result
76
+ if rendered_content != paragraph(content)
77
+ return "<#{open_tag}>\n#{rendered_content}<#{close_tag}>"
78
+ end
75
79
  end
80
+ raw
76
81
  end
77
82
 
78
83
  #
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module HashiCorp
3
- VERSION = "0.3.35"
3
+ VERSION = "0.3.37"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-hashicorp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.35
4
+ version: 0.3.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-15 00:00:00.000000000 Z
11
+ date: 2018-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman