util.lua

changeset 9
13eb9435e1c0
parent 8
6dc28a66f4d9
child 10
58f3707e44d7
equal deleted inserted replaced
8:6dc28a66f4d9 9:13eb9435e1c0
7 end 7 end
8 return short_title; 8 return short_title;
9 end 9 end
10 10
11 -- Config -- 11 -- Config --
12 12 local conffile = ".blogrc";
13 dofile(arg[1] or ".blogrc") 13 for i=1,#arg do
14 if arg[i] == "-c" or arg[i] == "--config" then
15 table.remove(arg, i);
16 conffile = arg[i] or conffile;
17 table.remove(arg, i);
18 break;
19 end
20 end
21 dofile(conffile)
14 22
15 posts_dir = posts_dir or "_posts/" 23 posts_dir = posts_dir or "_posts/"
16 layouts_dir = layouts_dir or "_layouts/" 24 layouts_dir = layouts_dir or "_layouts/"
17 output_dir = output_dir or "./" 25 output_dir = output_dir or "./"
18 -- - -- - -- 26 -- - -- - --

mercurial