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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 721d30357bcb2f565178240d079daf73248427b1
4
- data.tar.gz: 70e2012df72bfc1b2c65ee71d1068a488dfe7f5a
3
+ metadata.gz: 0d9171829fd979d20f5c366136624319a3f550a3
4
+ data.tar.gz: feb35cf18015255fbe582a774ef8864013ff0156
5
5
  SHA512:
6
- metadata.gz: 50fcf54c8859478e0a80e03e5d53cec8d693577b89f32e59c8c3819d7fbb807daef7cc5c575355e3ebfd480575f740a3d806700184f12cbb2905332dfab74131
7
- data.tar.gz: ea0219c4433c2bf9dff427c48ae6b14d64a4f4cfbeb8b430680241eea8d83e05ca0b5b5006ef2e5949f740d4b6eedfb11ba3207db34a4c59345f550baa5e92ba
6
+ metadata.gz: b8fb906e311d32a4d30647c48c2464187b282d67de2c6de58aaa6ee9a827cd9f4505d1da930cccc345b60cfb9669959369bf5255eaa786661c3f2067b774c303
7
+ data.tar.gz: 5b040b814070f9e49f9e03f6700b0b5f0422eb1cd8ae436105cafabb89f6fa168ead4b89b3cf02fc3f1f7bd9409d198e0197ca9c24bbfb53a941107b6dcd68f5
data/data/VERSION CHANGED
@@ -1 +1 @@
1
- RuneBlog v 0.0.22 2017-05-08
1
+ RuneBlog v 0.0.23 2017-05-08
@@ -1,6 +1,6 @@
1
1
  <html>
2
2
 
3
- <body background=;speckle-texture-vector.jpg;>
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 = ;//connect.facebook.net/en_US/sdk.js;;
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=;fb:admins; content=;767352779; />
26
-
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};/>
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['pubdate']}
42
+ #{@meta.pubdate}
43
43
  </td>
44
44
  <td width=5%></td>
45
45
  <td align=top>
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>
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=;https://twitter.com/hal_fulton; class=;twitter-follow-button; data-show-count=;false;>Follow @hal_fulton</a>
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=;fb-like;
56
- data-share=;true;
57
- data-width=;450;
58
- data-show-faces=;true;>
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.22"
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}EOS"
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
- @bloghead = interpolate(BlogHeader)
193
- @blogtail = interpolate(BlogTrailer)
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
- out = @bloghead
198
- posts.each {|post| out << posting(view, post) }
199
- out << @blogtail
200
- File.open("#{vdir}/index.html", "w") {|f| f.puts out }
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
- @posthead = interpolate(PostHeader)
215
- @posttail = interpolate(PostTrailer)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton