middleman-navtree 0.1.8 → 0.1.9
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 +8 -8
- data/README.md +1 -0
- data/lib/middleman-navtree/extension.rb +5 -2
- data/lib/middleman-navtree/version.rb +1 -1
- data/middleman-navtree.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTNhZGU3MjU2YmRkZmMzMWNkMGI2N2Q2NDNhYjFlZmJkYjhhYjQxZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGNlNTYxYTg1MzZkN2FjZmE3NDEyM2NlNDUxZTViMjU2MzgzOGMxNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzViNmVhMDU1NmY2OWU4MzFiMzJkZjg1YTFiYTgyYTM4ZGY1NDUzMDQxNWYx
|
10
|
+
YzM2OTcwNTc0NjEwZmY4ZTUyZTgzNWJlMTg4ZDRjOWE2ZWZhNWVkOTE0MDc1
|
11
|
+
N2UzMDRlOWZjNjQ3YzM1NzZhZGRhM2JjYTllYmEwZjUyMmE3MzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmJmNjQyZTMzMGJhNjRmYmMzMzFkZDY1MmQ5OGY1ZmVkZDk0YzY5YmQzODYz
|
14
|
+
YTczZmViYzQ2MmU2YWM0OTE1ZjA4ZDBjZjNjZDM4MmYwODgxZDYwNzAyNTE4
|
15
|
+
YzkzMzM2MGIzM2JhMmY1NDE5OWQzOGU1OGYwOWZjYzdlNWQ5N2E=
|
data/README.md
CHANGED
@@ -20,6 +20,7 @@ Alternatively, you can specify the options you want. Here's an example showing t
|
|
20
20
|
|
21
21
|
activate :navtree do |options|
|
22
22
|
options.data_file = 'tree.yml' # The data file where our navtree is stored.
|
23
|
+
options.automatic_tree_updates = true # The tree.yml file will be updated automatically when source files are changed.
|
23
24
|
options.source_dir = 'source' # The `source` directory we want to represent in our nav tree.
|
24
25
|
options.ignore_files = ['sitemap.xml', 'robots.txt'] # An array of files we want to ignore when building our tree.
|
25
26
|
options.ignore_dir = ['assets'] # An array of directories we want to ignore when building our tree.
|
@@ -10,6 +10,7 @@ module Middleman
|
|
10
10
|
# All the options for this extension
|
11
11
|
option :source_dir, 'source', 'The directory our tree will begin at.'
|
12
12
|
option :data_file, 'tree.yml', 'The file we will write our directory tree to.'
|
13
|
+
option :automatic_tree_updates, true, 'The tree.yml file will be updated automatically when source files are changed.'
|
13
14
|
option :ignore_files, ['sitemap.xml', 'robots.txt'], 'A list of filenames we want to ignore when building our tree.'
|
14
15
|
option :ignore_dir, ['assets'], 'A list of directory names we want to ignore when building our tree.'
|
15
16
|
option :home_title, 'Home', 'The default link title of the home page (located at "/"), if otherwise not detected.'
|
@@ -51,8 +52,10 @@ module Middleman
|
|
51
52
|
# Write our directory tree to file as YAML.
|
52
53
|
# @todo: This step doesn't rebuild during live-reload, which causes errors if you move files
|
53
54
|
# around during development. It may not be that hard to set up. Low priority though.
|
54
|
-
|
55
|
-
|
55
|
+
if options.automatic_tree_updates
|
56
|
+
data_path = app.settings.data_dir + '/' + options.data_file
|
57
|
+
IO.write(data_path, YAML::dump(tree_hash))
|
58
|
+
end
|
56
59
|
end
|
57
60
|
|
58
61
|
|
data/middleman-navtree.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-navtree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Braun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|