paperwork 0.2.2 → 0.2.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -1
- data/lib/paperwork/tasks/document.rb +1 -0
- data/lib/paperwork/tasks/middleman_template/lib/info_helpers.rb +20 -1
- data/lib/paperwork/tasks/root_helpers.rb +1 -1
- data/lib/paperwork/version.rb +1 -1
- data/{navdemo.md → nested_example/navdemo.md} +3 -0
- data/site.yml +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a4d78a79310dd0ce95afc1fa65864f5a5b8f71a0d01972762484c9ab4d4e28c
|
4
|
+
data.tar.gz: 6d5edf6cddc099b47bf01e659a639df84a7305ac1d895aeb31018d65a20f8e87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5983c073fb3c2295aa6827c66f6c27f647a3f3d19efaad7bce6c5ccaccdf0b67e42aeea9096c3a814ec5fea39a7980eee4df5c65aa462da0e82f51dfbccdcba4
|
7
|
+
data.tar.gz: 7038d59fa69df43ef00541adc169a440439dda1f418822a0c4c36fcb86322f2866f2f988cca6e55143cb25bd81c92449b234dbf0dbff8c911521bfd1730d6191
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -13,4 +13,4 @@ task rebuild: [:clean, :build]
|
|
13
13
|
task default: :spec
|
14
14
|
CLEAN.include(".work/coverage")
|
15
15
|
|
16
|
-
paperwork :doc, sources: ["README.md", "navdemo.md", "site.yml", "custom.js", "custom.css"]
|
16
|
+
paperwork :doc, sources: ["README.md", "nested_example/navdemo.md", "site.yml", "custom.js", "custom.css"]
|
@@ -20,6 +20,21 @@ module InfoHelpers
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def relative_link(stringifyable)
|
24
|
+
relative = String.new
|
25
|
+
dots = current_page.path.split(/[\/\\]/).size - 1
|
26
|
+
dots.times{ relative += "../" }
|
27
|
+
# This has been some nasty part to debug...
|
28
|
+
# keep these comments for debugging session yet to come
|
29
|
+
# puts "##################################"
|
30
|
+
# puts "current_page.path: #{current_page.path}"
|
31
|
+
# puts "stringifyable: #{stringifyable.to_s}"
|
32
|
+
# puts "dots: #{dots}"
|
33
|
+
# puts "relative link: #{relative + stringifyable.to_s}"
|
34
|
+
# puts "##################################"
|
35
|
+
relative + stringifyable.to_s
|
36
|
+
end
|
37
|
+
|
23
38
|
def site?
|
24
39
|
data.respond_to?(:site)
|
25
40
|
end
|
@@ -30,7 +45,11 @@ module InfoHelpers
|
|
30
45
|
|
31
46
|
def navbar_links
|
32
47
|
nav = data.site.navbar.links if navbar?
|
33
|
-
nav
|
48
|
+
nav ||= {}
|
49
|
+
nav.each do |name, link|
|
50
|
+
nav[name] = relative_link(link)
|
51
|
+
end
|
52
|
+
nav
|
34
53
|
end
|
35
54
|
|
36
55
|
def navbar_brand
|
data/lib/paperwork/version.rb
CHANGED
data/site.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schmid
|
@@ -161,7 +161,7 @@ files:
|
|
161
161
|
- lib/paperwork/tasks/root_helpers.rb
|
162
162
|
- lib/paperwork/tasks/template.rb
|
163
163
|
- lib/paperwork/version.rb
|
164
|
-
- navdemo.md
|
164
|
+
- nested_example/navdemo.md
|
165
165
|
- paperwork.gemspec
|
166
166
|
- site.yml
|
167
167
|
homepage: https://gitlab.com/couchbelag/paperwork
|