runeblog 0.2.75 → 0.2.76
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view/themes/standard/etc/misc.js +1 -0
- data/lib/helpers-blog.rb +8 -7
- data/lib/liveblog.rb +3 -3
- data/lib/runeblog.rb +7 -7
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0c80c77d6bdb17bf32c8a90ed26aa3e98b43493c7b38f7341a359e53bda7cff
|
4
|
+
data.tar.gz: 89d0a30d6f2ac56b932c8fd65d966ddcebed9320627ec032ae2d2ac68971a2e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bc7626f7e00f7e656982c3bb6f5fea92da173ae430a1b4cdb888dfb170a6af84c33dcd99b6541f57e67c716e23ed484e947ba616f43156dacc7242a97871af2
|
7
|
+
data.tar.gz: dd235b09c2f2f592f5a16afa574c62949731cbd634945b79e6969cfdfedbd9eb1132dad5bbd976416354972b4b9bf9d585e75bcd7aec264ec1d40c8f57e92a34
|
data/lib/helpers-blog.rb
CHANGED
@@ -21,13 +21,13 @@ module RuneBlog::Helpers
|
|
21
21
|
|
22
22
|
def get_repo_config
|
23
23
|
log!(enter: __method__, level: 3)
|
24
|
-
@editor = File.read("
|
25
|
-
@current_view = File.read("
|
26
|
-
@root = File.read("
|
24
|
+
@editor = File.read(".blogs/data/EDITOR").chomp
|
25
|
+
@current_view = File.read(".blogs/data/VIEW").chomp
|
26
|
+
@root = File.read(".blogs/data/ROOT").chomp
|
27
27
|
rescue => err
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
puts "Can't read config: #{err}"
|
29
|
+
puts err.backtrace.join("\n")
|
30
|
+
puts "dir = #{Dir.pwd}"
|
31
31
|
end
|
32
32
|
|
33
33
|
def copy_data(tag, dest)
|
@@ -84,7 +84,7 @@ module RuneBlog::Helpers
|
|
84
84
|
dirs.map {|name| RuneBlog::View.new(name) }
|
85
85
|
end
|
86
86
|
|
87
|
-
def write_repo_config(root: "#{Dir.pwd}/.blogs", view: "
|
87
|
+
def write_repo_config(root: "#{Dir.pwd}/.blogs", view: "#{root}/data/VIEW", editor: "#{root}/data/EDITOR")
|
88
88
|
File.write(root + "/data/ROOT", root + "\n")
|
89
89
|
File.write(root + "/data/VIEW", view.to_s + "\n")
|
90
90
|
File.write(root + "/data/EDITOR", editor + "\n")
|
@@ -108,6 +108,7 @@ module RuneBlog::Helpers
|
|
108
108
|
|
109
109
|
def subdirs(dir)
|
110
110
|
log!(enter: __method__, args: [dir], level: 3)
|
111
|
+
STDERR.puts dir
|
111
112
|
dirs = Dir.entries(dir) - %w[. ..]
|
112
113
|
dirs.reject! {|x| ! File.directory?("#@root/views/#{x}") }
|
113
114
|
dirs
|
data/lib/liveblog.rb
CHANGED
@@ -5,7 +5,7 @@ require 'find'
|
|
5
5
|
|
6
6
|
require 'runeblog'
|
7
7
|
require 'pathmagic'
|
8
|
-
|
8
|
+
require 'xlate'
|
9
9
|
|
10
10
|
|
11
11
|
def init_liveblog # FIXME - a lot of this logic sucks
|
@@ -636,7 +636,7 @@ def sidebar
|
|
636
636
|
File.open(wtag/"vars.lt3", "w") do |f|
|
637
637
|
f.puts ".set ad.image = #{img}"
|
638
638
|
end
|
639
|
-
|
639
|
+
xlate cwd: wtag, src: tag, dst: tcard, force: true # , deps: depend # , debug: true
|
640
640
|
end
|
641
641
|
|
642
642
|
_include_file wtag/tcard
|
@@ -776,7 +776,7 @@ def _make_navbar(orient = :horiz)
|
|
776
776
|
output.puts %[<li class="nav-item active"> <a class="nav-link" href="index.html">#{cdata}<span class="sr-only">(current)</span></a> </li>]
|
777
777
|
else
|
778
778
|
dir = @blog.root/:views/@blog.view/"themes/standard/banner"
|
779
|
-
|
779
|
+
xlate cwd: dir, src: basename, dst: vdir/"remote/banner"/basename+".html" # , debug: true
|
780
780
|
output.puts %[<li class="nav-item"> <a class="nav-link" #{href_main}>#{cdata}</a> </li>]
|
781
781
|
end
|
782
782
|
end
|
data/lib/runeblog.rb
CHANGED
@@ -147,7 +147,7 @@ class RuneBlog
|
|
147
147
|
dir = @root/:posts/nslug
|
148
148
|
create_dirs(dir)
|
149
149
|
# FIXME dependencies?
|
150
|
-
|
150
|
+
xlate cwd: dir, src: @root/:drafts/sourcefile # , debug: true
|
151
151
|
_deploy_local(dir)
|
152
152
|
rescue => err
|
153
153
|
_tmp_error(err)
|
@@ -319,7 +319,7 @@ class RuneBlog
|
|
319
319
|
@theme = @view.dir/"themes/standard"
|
320
320
|
post_entry_name = @theme/"blog/post_entry.lt3"
|
321
321
|
depend = [post_entry_name]
|
322
|
-
|
322
|
+
xlate src: post_entry_name, dst: "/tmp/post_entry.html" # , deps: depend # , debug: true
|
323
323
|
@_post_entry ||= File.read("/tmp/post_entry.html")
|
324
324
|
vp = post_lookup(id)
|
325
325
|
nslug, aslug, title, date, teaser_text =
|
@@ -435,9 +435,9 @@ class RuneBlog
|
|
435
435
|
@theme/"blog/head.lt3",
|
436
436
|
# @theme/"navbar/navbar.lt3",
|
437
437
|
@theme/"blog/index.lt3"] # FIXME what about assets?
|
438
|
-
|
438
|
+
xlate cwd: vdir/"themes/standard/etc", deps: depend,
|
439
439
|
src: "blog.css.lt3", copy: vdir/"remote/etc/" # , debug: true
|
440
|
-
|
440
|
+
xlate cwd: vdir/"themes/standard", deps: depend, force: true,
|
441
441
|
src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
|
442
442
|
copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
|
443
443
|
copy_widget_html(view)
|
@@ -546,7 +546,7 @@ class RuneBlog
|
|
546
546
|
# Step 1...
|
547
547
|
create_dirs(pdraft)
|
548
548
|
# FIXME dependencies?
|
549
|
-
|
549
|
+
xlate cwd: pdraft, src: draft, dst: "guts.html" # , debug: true
|
550
550
|
_post_metadata(draft, pdraft)
|
551
551
|
# Step 2...
|
552
552
|
vposts = @root/:views/view_name/:posts
|
@@ -556,10 +556,10 @@ class RuneBlog
|
|
556
556
|
copy(pdraft/"vars.lt3", @theme/:post)
|
557
557
|
# Step 4...
|
558
558
|
# FIXME dependencies?
|
559
|
-
|
559
|
+
xlate cwd: @theme/:post, src: "generate.lt3", force: true,
|
560
560
|
dst: remote/ahtml, copy: @theme/:post # , debug: true
|
561
561
|
# FIXME dependencies?
|
562
|
-
|
562
|
+
xlate cwd: @theme/:post, src: "permalink.lt3",
|
563
563
|
dst: remote/:permalink/ahtml # , debug: true
|
564
564
|
copy_widget_html(view_name)
|
565
565
|
rescue => err
|
data/lib/runeblog_version.rb
CHANGED