hologram 0.5.8 → 0.5.9

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
  SHA1:
3
- metadata.gz: e7d3e6ddbc716b6dd6aa6014ca5a07d78a07c888
4
- data.tar.gz: efc47c65a4ba7578a446f52d255d0c0f41e6bd42
3
+ metadata.gz: 0e48a782a8a76b16ebd3ae5127bf1b331ae6d435
4
+ data.tar.gz: 01448485dc3f2ed3a396ab0fd2bc699dd7d9438e
5
5
  SHA512:
6
- metadata.gz: e05fee56543bca4255bd6f690c4e1d5aaf7fa648586d2e262adcc477f9b0581507847f7b019a3dc85369773a1733746bec00c6da74aab72d0981c2eea2fa162e
7
- data.tar.gz: 41d73c2d4e16a03c0dfa2a14e7d5738a63584c6b5a40f459edb5c3685883746609bd08d600b72c1df117fb27ee127ddc36413b84fbe4e10fe48e3a9b8ffb9897
6
+ metadata.gz: 380bd924c01c63dd9b9dfba8fffee5acc19e48806da2157901fcda52ded6e30f5ee5b5d367111449188904fc17b0120c313171cd5db2f82dc26bd224f501a185
7
+ data.tar.gz: 9837b618d0854234b1e85cc32ffb53bcaa41dfc09c0f3b029bb1b7ce74f83b405ffadb5ce93ac775bd32fc4b1ba28e3165fb3361d4e688f2a2fbd69457a353f7
data/lib/hologram.rb CHANGED
@@ -276,7 +276,7 @@ module Hologram
276
276
  end
277
277
 
278
278
  @doc_blocks[doc_block.name] = doc_block;
279
- doc_block.markdown = "\n\n<h1 id=\"#{doc_block.name}\">#{doc_block.title}</h1>" + doc_block.markdown
279
+ doc_block.markdown = "\n\n<#{@config['parent_heading_tag']} id=\"#{doc_block.name}\">#{doc_block.title}</#{@config['parent_heading_tag']}>" + doc_block.markdown
280
280
  else
281
281
  # child file
282
282
  parent_doc_block = @doc_blocks[doc_block.parent]
@@ -284,7 +284,7 @@ module Hologram
284
284
  if doc_block.title.nil?
285
285
  doc_block.markdown = doc_block.markdown
286
286
  else
287
- doc_block.markdown = "\n\n<h1 id=\"#{doc_block.name}\">#{doc_block.title}</h1>" + doc_block.markdown
287
+ doc_block.markdown = "\n\n<#{@config['child_heading_tag']} id=\"#{doc_block.name}\">#{doc_block.title}</#{@config['child_heading_tag']}>" + doc_block.markdown
288
288
  end
289
289
  parent_doc_block.children[doc_block.name] = doc_block
290
290
  else
@@ -390,6 +390,15 @@ module Hologram
390
390
  unless @config.key?('documentation_assets')
391
391
  display_error "No documentation assets directory specified"
392
392
  end
393
+
394
+ #Setup some defaults for these guys
395
+ unless @config.key?('parent_heading_tag')
396
+ @config['parent_heading_tag'] = 'h1'
397
+ end
398
+
399
+ unless @config.key?('child_heading_tag')
400
+ @config['child_heading_tag'] = 'h2'
401
+ end
393
402
  end
394
403
 
395
404
 
@@ -25,5 +25,5 @@
25
25
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
26
 
27
27
  module Hologram
28
- VERSION = "0.5.8"
28
+ VERSION = "0.5.9"
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hologram
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - JD Cantrell
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-04 00:00:00.000000000 Z
12
+ date: 2013-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redcarpet