ghp 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/ghp +23 -0
- metadata +3 -4
- data/lib/nanoc/helpers.rb +0 -21
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/bin/ghp
CHANGED
@@ -3,10 +3,15 @@
|
|
3
3
|
|
4
4
|
# taken from nanoc version 3.5.0b2
|
5
5
|
|
6
|
+
# load Markdown parser
|
7
|
+
require 'redcarpet'
|
8
|
+
|
6
9
|
# Load nanoc
|
7
10
|
require 'nanoc'
|
8
11
|
require 'nanoc/cli'
|
9
12
|
|
13
|
+
include Nanoc::Helpers::Rendering
|
14
|
+
|
10
15
|
module Nanoc
|
11
16
|
class Site
|
12
17
|
def load_code_snippets
|
@@ -28,5 +33,23 @@ module Nanoc
|
|
28
33
|
end
|
29
34
|
end
|
30
35
|
|
36
|
+
module Nanoc::DataSources
|
37
|
+
module Filesystem
|
38
|
+
def items
|
39
|
+
ghp_config = Nanoc::Site.new('.').config
|
40
|
+
alt_content = ghp_config[:alt_content] || "content"
|
41
|
+
alt_dir = (["./lib"] + $:).collect {|x| File.join(File.expand_path("..", x), alt_content) }.select {|x| File.directory? x }[0]
|
42
|
+
load_objects(alt_dir, 'item', Nanoc::Item)
|
43
|
+
end
|
44
|
+
|
45
|
+
def layouts
|
46
|
+
ghp_config = Nanoc::Site.new('.').config
|
47
|
+
alt_layouts = ghp_config[:alt_layouts] || "layouts"
|
48
|
+
alt_dir = (["./lib"] + $:).collect {|x| File.join(File.expand_path("..", x), alt_layouts) }.select {|x| File.directory? x }[0]
|
49
|
+
load_objects(alt_dir, 'layout', Nanoc::Layout)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
31
54
|
# Run base
|
32
55
|
Nanoc::CLI.run(ARGV)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|
@@ -78,7 +78,6 @@ files:
|
|
78
78
|
- README.md
|
79
79
|
- lib/development.rb
|
80
80
|
- lib/ghp/version.rb
|
81
|
-
- lib/nanoc/helpers.rb
|
82
81
|
- bin/ghp
|
83
82
|
has_rdoc: true
|
84
83
|
homepage: https://github.com/destructuring/ghp
|
data/lib/nanoc/helpers.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'redcarpet'
|
2
|
-
|
3
|
-
module Nanoc::DataSources
|
4
|
-
module Filesystem
|
5
|
-
def items
|
6
|
-
ghp_config = Nanoc::Site.new('.').config
|
7
|
-
alt_content = ghp_config[:alt_content] || "content"
|
8
|
-
alt_dir = $:.collect {|x| File.join(File.expand_path("..", x), alt_content) }.select {|x| File.directory? x }[0]
|
9
|
-
load_objects(alt_dir, 'item', Nanoc::Item)
|
10
|
-
end
|
11
|
-
|
12
|
-
def layouts
|
13
|
-
ghp_config = Nanoc::Site.new('.').config
|
14
|
-
alt_layouts = ghp_config[:alt_layouts] || "layouts"
|
15
|
-
alt_dir = $:.collect {|x| File.join(File.expand_path("..", x), alt_layouts) }.select {|x| File.directory? x }[0]
|
16
|
-
load_objects(alt_dir, 'layout', Nanoc::Layout)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
include Nanoc3::Helpers::Rendering
|