runeblog 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/VERSION +1 -1
- data/data/views/_default/post_header.html +18 -18
- data/lib/runeblog.rb +15 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d9171829fd979d20f5c366136624319a3f550a3
|
4
|
+
data.tar.gz: feb35cf18015255fbe582a774ef8864013ff0156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8fb906e311d32a4d30647c48c2464187b282d67de2c6de58aaa6ee9a827cd9f4505d1da930cccc345b60cfb9669959369bf5255eaa786661c3f2067b774c303
|
7
|
+
data.tar.gz: 5b040b814070f9e49f9e03f6700b0b5f0422eb1cd8ae436105cafabb89f6fa168ead4b89b3cf02fc3f1f7bd9409d198e0197ca9c24bbfb53a941107b6dcd68f5
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.23 2017-05-08
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<html>
|
2
2
|
|
3
|
-
<body background
|
3
|
+
<body background='speckle-texture-vector.jpg'>
|
4
4
|
|
5
5
|
<script>
|
6
6
|
window.fbAsyncInit = function() {
|
@@ -15,20 +15,20 @@
|
|
15
15
|
var js, fjs = d.getElementsByTagName(s)[0];
|
16
16
|
if (d.getElementById(id)) {return;}
|
17
17
|
js = d.createElement(s); js.id = id;
|
18
|
-
js.src =
|
18
|
+
js.src = '//connect.facebook.net/en_US/sdk.js';
|
19
19
|
fjs.parentNode.insertBefore(js, fjs);
|
20
20
|
}(document, 'script', 'facebook-jssdk'));
|
21
21
|
</script>
|
22
22
|
|
23
23
|
<head>
|
24
|
-
<title>#{title}</title>
|
25
|
-
<meta property
|
26
|
-
|
27
|
-
<meta property
|
28
|
-
<meta property
|
29
|
-
<meta property
|
30
|
-
<meta property
|
31
|
-
<meta property
|
24
|
+
<title>#{@meta.title}</title>
|
25
|
+
<meta property='fb:admins' content='767352779' />
|
26
|
+
|
27
|
+
<meta property='og:url' content='http://rubyhacker.com/blog2/#{@meta.slug}.html'/>
|
28
|
+
<meta property='og:type' content='article'/>
|
29
|
+
<meta property='og:title' content='#{@meta.title}'/>
|
30
|
+
<meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
|
31
|
+
<meta property='og:description' content='#{@meta.teaser}'/>
|
32
32
|
</head>
|
33
33
|
|
34
34
|
<table bgcolor=#eeeeee>
|
@@ -37,25 +37,25 @@
|
|
37
37
|
<td width=2%></td>
|
38
38
|
<td align=top>
|
39
39
|
<br>
|
40
|
-
<font size=+2 color=red>#{title}</font>
|
40
|
+
<font size=+2 color=red>#{@meta.title}</font>
|
41
41
|
<br>
|
42
|
-
#{meta
|
42
|
+
#{@meta.pubdate}
|
43
43
|
</td>
|
44
44
|
<td width=5%></td>
|
45
45
|
<td align=top>
|
46
|
-
<a href
|
46
|
+
<a href='https://twitter.com/share' class='twitter-share-button' data-text='#{'tweet'}' data-url='#{'url'}' data-via='hal_fulton' data-related='hal_fulton'>Tweet</a>
|
47
47
|
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
48
48
|
<br>
|
49
|
-
<a href
|
49
|
+
<a href='https://twitter.com/hal_fulton' class='twitter-follow-button' data-show-count='false'>Follow @hal_fulton</a>
|
50
50
|
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
51
51
|
|
52
52
|
|
53
53
|
<body>
|
54
54
|
<div
|
55
|
-
class
|
56
|
-
data-share
|
57
|
-
data-width
|
58
|
-
data-show-faces
|
55
|
+
class='fb-like'
|
56
|
+
data-share='true'
|
57
|
+
data-width='450'
|
58
|
+
data-show-faces='true'>
|
59
59
|
</div>
|
60
60
|
|
61
61
|
<hr>
|
data/lib/runeblog.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
class RuneBlog
|
3
|
-
VERSION = "0.0.
|
3
|
+
VERSION = "0.0.23"
|
4
4
|
|
5
5
|
Path = File.expand_path(File.join(File.dirname(__FILE__)))
|
6
6
|
DefaultData = Path + "/../data"
|
@@ -34,7 +34,7 @@ def bold(str)
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def interpolate(str)
|
37
|
-
wrap = "<<-EOS\n#{str}
|
37
|
+
wrap = "<<-EOS\n#{str}\nEOS"
|
38
38
|
eval wrap
|
39
39
|
end
|
40
40
|
|
@@ -189,15 +189,18 @@ def generate_index(view)
|
|
189
189
|
posts = posts.sort.reverse
|
190
190
|
|
191
191
|
# Add view header/trailer
|
192
|
-
|
193
|
-
|
192
|
+
head = File.read("#{vdir}/custom/blog_header.html") rescue RuneBlog::BlogHeader
|
193
|
+
tail = File.read("#{vdir}/custom/blog_trailer.html") rescue RuneBlog::BlogTrailer
|
194
|
+
@bloghead = interpolate(head)
|
195
|
+
@blogtail = interpolate(tail)
|
194
196
|
|
195
197
|
# Output view
|
196
198
|
posts.map! {|post| YAML.load(File.read("#{vdir}/#{post}/metadata.yaml")) }
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
199
|
+
File.open("#{vdir}/index.html", "w") do |f|
|
200
|
+
f.puts @bloghead
|
201
|
+
posts.each {|post| f.puts posting(view, post) }
|
202
|
+
f.puts @blogtail
|
203
|
+
end
|
201
204
|
end
|
202
205
|
|
203
206
|
### link_post_view
|
@@ -211,8 +214,10 @@ def link_post_view(view)
|
|
211
214
|
system(cmd)
|
212
215
|
File.write("#{dir}/metadata.yaml", @meta.to_yaml)
|
213
216
|
# Add header/trailer to post index
|
214
|
-
|
215
|
-
|
217
|
+
head = File.read("#{vdir}/custom/post_header.html") rescue RuneBlog::PostHeader
|
218
|
+
tail = File.read("#{vdir}/custom/post_trailer.html") rescue RuneBlog::PostTrailer
|
219
|
+
@posthead = interpolate(head)
|
220
|
+
@posttail = interpolate(tail)
|
216
221
|
File.open("#{dir}/index.html", "w") do |f|
|
217
222
|
f.puts @posthead
|
218
223
|
f.puts @meta.body
|