build.lua

changeset 4
cebf96c3b522
parent 3
f22a275a3a33
child 5
951de9625338
equal deleted inserted replaced
3:f22a275a3a33 4:cebf96c3b522
33 -- Ignore dotfiles 33 -- Ignore dotfiles
34 if not post_filename:match("^%.") then 34 if not post_filename:match("^%.") then
35 msg_info("Processing %s", post_filename); 35 msg_info("Processing %s", post_filename);
36 local post_file, err = io.open(posts_dir..post_filename); 36 local post_file, err = io.open(posts_dir..post_filename);
37 if post_file then 37 if post_file then
38 local post_format = post_filename:match("%.(%w+)") or "text"; 38 local post_format = post_filename:match("%.(%w+)$") or "text";
39 local post = { filename = post_filename, path = posts_dir..post_filename, format = post_format }; 39 local post = { filename = post_filename, path = posts_dir..post_filename, format = post_format };
40 if not parsers[post_format] then 40 if not parsers[post_format] then
41 msg_warn("Post format '%s' not supported", post_format); 41 msg_warn("Post format '%s' not supported", post_format);
42 else 42 else
43 local inside_header, line_num = nil, 0; 43 local inside_header, line_num = nil, 0;

mercurial