runeblog 0.0.21 → 0.0.22
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/data/VERSION +1 -1
- data/data/views/_default/post_header.html +14 -16
- data/lib/runeblog.rb +11 -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: 721d30357bcb2f565178240d079daf73248427b1
|
4
|
+
data.tar.gz: 70e2012df72bfc1b2c65ee71d1068a488dfe7f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50fcf54c8859478e0a80e03e5d53cec8d693577b89f32e59c8c3819d7fbb807daef7cc5c575355e3ebfd480575f740a3d806700184f12cbb2905332dfab74131
|
7
|
+
data.tar.gz: ea0219c4433c2bf9dff427c48ae6b14d64a4f4cfbeb8b430680241eea8d83e05ca0b5b5006ef2e5949f740d4b6eedfb11ba3207db34a4c59345f550baa5e92ba
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.22 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,24 +15,22 @@
|
|
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
24
|
<title>#{title}</title>
|
25
|
-
<meta property
|
25
|
+
<meta property=;fb:admins; content=;767352779; />
|
26
26
|
|
27
|
-
<meta property
|
28
|
-
<meta property
|
29
|
-
<meta property
|
30
|
-
<meta property
|
31
|
-
<meta property
|
27
|
+
<meta property=;og:url; content=;http://rubyhacker.com/blog2/#{slug}.html;/>
|
28
|
+
<meta property=;og:type; content=;article;/>
|
29
|
+
<meta property=;og:title; content=;#{title};/>
|
30
|
+
<meta property=;og:image; content=;http://rubyhacker.com/blog2/blog3b.gif;/>
|
31
|
+
<meta property=;og:description; content=;#{teaser};/>
|
32
32
|
</head>
|
33
33
|
|
34
|
-
<body background="speckle-texture-vector.jpg">
|
35
|
-
|
36
34
|
<table bgcolor=#eeeeee>
|
37
35
|
<tr height=5>
|
38
36
|
<tr>
|
@@ -45,19 +43,19 @@
|
|
45
43
|
</td>
|
46
44
|
<td width=5%></td>
|
47
45
|
<td align=top>
|
48
|
-
<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>
|
49
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>
|
50
48
|
<br>
|
51
|
-
<a href
|
49
|
+
<a href=;https://twitter.com/hal_fulton; class=;twitter-follow-button; data-show-count=;false;>Follow @hal_fulton</a>
|
52
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>
|
53
51
|
|
54
52
|
|
55
53
|
<body>
|
56
54
|
<div
|
57
|
-
class
|
58
|
-
data-share
|
59
|
-
data-width
|
60
|
-
data-show-faces
|
55
|
+
class=;fb-like;
|
56
|
+
data-share=;true;
|
57
|
+
data-width=;450;
|
58
|
+
data-show-faces=;true;>
|
61
59
|
</div>
|
62
60
|
|
63
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.22"
|
4
4
|
|
5
5
|
Path = File.expand_path(File.join(File.dirname(__FILE__)))
|
6
6
|
DefaultData = Path + "/../data"
|
@@ -33,6 +33,10 @@ def bold(str)
|
|
33
33
|
"\e[1m#{str}\e[22m"
|
34
34
|
end
|
35
35
|
|
36
|
+
def interpolate(str)
|
37
|
+
wrap = "<<-EOS\n#{str}EOS"
|
38
|
+
eval wrap
|
39
|
+
end
|
36
40
|
|
37
41
|
|
38
42
|
### ask
|
@@ -68,7 +72,7 @@ def new_blog!
|
|
68
72
|
f.puts "data"
|
69
73
|
f.puts "no_default"
|
70
74
|
end
|
71
|
-
|
75
|
+
File.open("data/VERSION", "a") {|f| f.puts "\nBlog created: " + Time.now.to_s }
|
72
76
|
end
|
73
77
|
end
|
74
78
|
end
|
@@ -185,12 +189,12 @@ def generate_index(view)
|
|
185
189
|
posts = posts.sort.reverse
|
186
190
|
|
187
191
|
# Add view header/trailer
|
188
|
-
@bloghead =
|
189
|
-
@blogtail =
|
192
|
+
@bloghead = interpolate(BlogHeader)
|
193
|
+
@blogtail = interpolate(BlogTrailer)
|
190
194
|
|
191
195
|
# Output view
|
192
196
|
posts.map! {|post| YAML.load(File.read("#{vdir}/#{post}/metadata.yaml")) }
|
193
|
-
out = @bloghead
|
197
|
+
out = @bloghead
|
194
198
|
posts.each {|post| out << posting(view, post) }
|
195
199
|
out << @blogtail
|
196
200
|
File.open("#{vdir}/index.html", "w") {|f| f.puts out }
|
@@ -201,17 +205,14 @@ end
|
|
201
205
|
def link_post_view(view)
|
202
206
|
# Create dir using slug (index.html, metadata?)
|
203
207
|
vdir = "#{@config.root}/views/#{view}"
|
204
|
-
p "vdir = #{vdir}"
|
205
208
|
dir = "#{vdir}/#{@meta.slug}"
|
206
|
-
p "dir = #{dir}"
|
207
|
-
p "cwd = #{Dir.pwd}"
|
208
209
|
cmd = "mkdir -p #{dir}" #-- FIXME what if this exists??
|
209
210
|
puts " Running: #{cmd}"
|
210
211
|
system(cmd)
|
211
212
|
File.write("#{dir}/metadata.yaml", @meta.to_yaml)
|
212
213
|
# Add header/trailer to post index
|
213
|
-
@posthead
|
214
|
-
@posttail
|
214
|
+
@posthead = interpolate(PostHeader)
|
215
|
+
@posttail = interpolate(PostTrailer)
|
215
216
|
File.open("#{dir}/index.html", "w") do |f|
|
216
217
|
f.puts @posthead
|
217
218
|
f.puts @meta.body
|