rack-jekyll 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -0
- data/README.markdown +5 -0
- data/lib/rack/jekyll/version.rb +1 -1
- data/lib/rack/jekyll.rb +3 -3
- metadata +1 -1
data/LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -68,3 +68,8 @@ It now can read the `_config.yml` file for destination path. Read [Jekyll Config
|
|
68
68
|
## 404 page
|
69
69
|
|
70
70
|
You can create a new file: `404.html` with YAML Front Matter. See my [Heroku Demo 404](http://bry4n.heroku.com/show/me/404/)
|
71
|
+
|
72
|
+
|
73
|
+
## Contribution
|
74
|
+
|
75
|
+
Contributing this is more than just welcome. Fork this and create a new branch then pull request.
|
data/lib/rack/jekyll/version.rb
CHANGED
data/lib/rack/jekyll.rb
CHANGED
@@ -6,8 +6,8 @@ module Rack
|
|
6
6
|
class Jekyll
|
7
7
|
|
8
8
|
def initialize(opts = {})
|
9
|
-
if ::File.exist?("_config.yml")
|
10
|
-
@config = ::YAML.load(::File.read("_config.yml"))
|
9
|
+
if ::File.exist?(Dir.pwd + "/_config.yml")
|
10
|
+
@config = ::YAML.load(::File.read(Dir.pwd + "/_config.yml"))
|
11
11
|
if @config[:desination].nil?
|
12
12
|
@path = opts[:desination].nil? ? "_site" : opts[:desination]
|
13
13
|
else
|
@@ -16,7 +16,7 @@ module Rack
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
@files = ::Dir[@path + "/**/*"].inspect
|
19
|
-
@mimes = Rack::Mime::MIME_TYPES.map{|k,v
|
19
|
+
@mimes = Rack::Mime::MIME_TYPES.map{|k,v| /#{k.gsub('.','\.')}$/i }
|
20
20
|
@compiling = false
|
21
21
|
if ::Dir[@path + "/**/*"].empty?
|
22
22
|
begin
|