middleman-page-toc 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 855385c433027c349a89cf3fbeef7e0ce72dff6c
4
- data.tar.gz: d05ab6780cd6e06096c5158cb357d1bf4d2343ee
3
+ metadata.gz: 52b280eb1abcbff30987b7390232d3548d51f3a6
4
+ data.tar.gz: 1dcb3ea819d1ac7a8ad89cfe76ccef6e04866c2b
5
5
  SHA512:
6
- metadata.gz: 65841d01670d523d08113e1b8e3b57de7c9c6b61888ae773be89a5f9232a59d94686af31757aaa4d6a005bc61a8135e62997bb0e20680f1f96d71bd163d9f85c
7
- data.tar.gz: 917c167166a6ee536091af4a485db4a51b74f2c22bd14c6d2677092754dddfb7250784595609b982a6ec4734d876d34643a5349d1fe026c195522c4a46c89a37
6
+ metadata.gz: 1fb8a8fa38e465be341f09cca35dbdcce0e55b511adc134b9fb74e6f1800e66d5e9522e955c25cb85263b21bd614d1cba7ae224e95f4e20e0fd89ab575886b37
7
+ data.tar.gz: 3fea0fa4b6d6e76fe77245c4b46e8acd36e6792fb6cb29d2c39b1af344bc97f6c47d489fdab2d289a5c3dac4bf53ff4eb6656a2fc0a3b922a079d655c7c4f4b1
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # middleman-page-toc
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/middleman`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ An extension to Middleman which provides a helper method to render table of contents of the specified page/resource.
6
4
 
7
5
  ## Installation
8
6
 
@@ -20,19 +18,37 @@ Or install it yourself as:
20
18
 
21
19
  $ gem install middleman-page-toc
22
20
 
21
+ ## Settings
22
+
23
+ Use **redcarpet** as markdown engine and enable :toc_data option. and then activate this extension:
24
+
25
+ ```ruby
26
+ set :markdown_engine, :redcarpet
27
+ set :markdown, :fenced_code_blocks => true, :autolink => true,
28
+ :smartypants => true, :tables => true, :with_toc_data => true
29
+
30
+ activate :page_toc
31
+ ```
32
+
23
33
  ## Usage
24
34
 
25
- TODO: Write usage instructions here
35
+ use **render_toc(page, options)** helper function on your layout or page.
36
+
37
+ ```ruby
38
+ <%= render_toc(current_page) %>
39
+ ```
26
40
 
27
- ## Development
41
+ ### options
28
42
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
43
+ - :use_collapsing
44
+ - :button_caption
45
+ - :expand
30
46
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
47
+ You must setup **twitter-bootstrap** css/js on your environment to use collapsing.
32
48
 
33
49
  ## Contributing
34
50
 
35
- 1. Fork it ( https://github.com/[my-github-username]/middleman/fork )
51
+ 1. Fork it ( https://github.com/atarukoddaka/middleman-page-toc/fork )
36
52
  2. Create your feature branch (`git checkout -b my-new-feature`)
37
53
  3. Commit your changes (`git commit -am 'Add some feature'`)
38
54
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module PageToc
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -1,2 +1,2 @@
1
- require 'middleman-aks'
1
+ require 'middleman-page-toc'
2
2
 
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Write a short summary, because Rubygems requires one.}
13
13
  spec.description = %q{Write a longer description or delete this line.}
14
- spec.homepage = "http://atarukodaka.github.com/middleman-page-toc"
14
+ spec.homepage = "http://github.com/atarukodaka/middleman-page-toc"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
17
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-page-toc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ataru Kodaka
@@ -68,7 +68,7 @@ files:
68
68
  - lib/middleman-page-toc/version.rb
69
69
  - lib/middleman_extension.rb
70
70
  - middleman-page-toc.gemspec
71
- homepage: http://atarukodaka.github.com/middleman-page-toc
71
+ homepage: http://github.com/atarukodaka/middleman-page-toc
72
72
  licenses:
73
73
  - MIT
74
74
  metadata: {}