middleman-blog 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore
CHANGED
@@ -66,7 +66,7 @@ module Middleman
|
|
66
66
|
data["url"] = article.gsub(app.views, "").split(".html").first + ".html"
|
67
67
|
|
68
68
|
all_content = Tilt.new(article).render
|
69
|
-
data["body"] = all_content.gsub
|
69
|
+
data["body"] = all_content.gsub(app.settings.blog_summary_separator, "")
|
70
70
|
|
71
71
|
sum = if data["raw"] =~ app.settings.blog_summary_separator
|
72
72
|
data["raw"].split(app.settings.blog_summary_separator).first
|
@@ -74,7 +74,12 @@ module Middleman
|
|
74
74
|
data["raw"].match(/(.{1,#{app.settings.blog_summary_length}}.*?)(\n|\Z)/m).to_s
|
75
75
|
end
|
76
76
|
|
77
|
-
engine = app.settings.markdown_engine
|
77
|
+
engine = app.settings.markdown_engine
|
78
|
+
if engine.is_a? Symbol
|
79
|
+
engine = app.tilt_template_from_symbol(engine)
|
80
|
+
end
|
81
|
+
|
82
|
+
engine = engine.new { sum }
|
78
83
|
data["summary"] = engine.render
|
79
84
|
data
|
80
85
|
end.sort { |a, b| b["date"] <=> a["date"] }
|
@@ -152,4 +157,4 @@ module Middleman
|
|
152
157
|
end
|
153
158
|
end
|
154
159
|
end
|
155
|
-
end
|
160
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<article class="hentry">
|
2
|
+
<h1 class="entry-title">
|
3
|
+
<%= current_article_title %>
|
4
|
+
<time class="updated" pubdate><%= current_article_date.strftime('%b %e %Y') %></time>
|
5
|
+
</h1>
|
6
|
+
|
7
|
+
<div class="entry-content">
|
8
|
+
<%= yield_content :blog_article %>
|
9
|
+
</div>
|
10
|
+
</article>
|
data/middleman-blog.gemspec
CHANGED
@@ -19,5 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.
|
22
|
+
s.add_development_dependency("rake")
|
23
|
+
# s.add_runtime_dependency("middleman", ["~> 2.0.13"])
|
23
24
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thomas Reynolds
|
@@ -15,24 +15,23 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-22 00:00:00 -07:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: middleman
|
22
|
-
prerelease: false
|
23
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
|
-
- -
|
25
|
+
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
27
|
+
hash: 3
|
29
28
|
segments:
|
30
|
-
- 2
|
31
29
|
- 0
|
32
|
-
|
33
|
-
version: 2.0.2
|
34
|
-
type: :runtime
|
30
|
+
version: "0"
|
35
31
|
version_requirements: *id001
|
32
|
+
name: rake
|
33
|
+
prerelease: false
|
34
|
+
type: :development
|
36
35
|
description: A blog foundation using Middleman
|
37
36
|
email:
|
38
37
|
- me@tdreyno.com
|
@@ -54,6 +53,7 @@ files:
|
|
54
53
|
- lib/middleman-blog/template/config.ru
|
55
54
|
- lib/middleman-blog/template/config.tt
|
56
55
|
- lib/middleman-blog/template/source/2011/01/01/new-article.html.markdown
|
56
|
+
- lib/middleman-blog/template/source/_article_template.erb
|
57
57
|
- lib/middleman-blog/template/source/archives/index.html.erb
|
58
58
|
- lib/middleman-blog/template/source/feed.xml.builder
|
59
59
|
- lib/middleman-blog/template/source/index.html.erb
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- lib/middleman-blog/version.rb
|
62
62
|
- lib/middleman_init.rb
|
63
63
|
- middleman-blog.gemspec
|
64
|
+
has_rdoc: true
|
64
65
|
homepage: https://github.com/tdreyno/middleman-blog
|
65
66
|
licenses: []
|
66
67
|
|
@@ -90,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
requirements: []
|
91
92
|
|
92
93
|
rubyforge_project: middleman-blog
|
93
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.6.2
|
94
95
|
signing_key:
|
95
96
|
specification_version: 3
|
96
97
|
summary: A blog foundation using Middleman
|