miti.sh/site.moon

24 lines
567 B
Plaintext

sitegen = require "sitegen"
lfs = require "lfs"
attrdir = (path) ->
for file in lfs.dir(path)
if file != "." and file != ".."
f = path .. '/' .. file
print "\t " .. f
attr = lfs.attributes(f)
assert type(attr) == "table"
attrdir(f) if attr.mode == "directory"
-- if attr.mode == "directory"
-- attrdir(f)
-- else
-- for name, value in pairs attr
-- print name, value
-- attrdir "www"
sitegen.create =>
@title = "Hello World"
add "index.md"
add "docs/post1.md", target: "/posts/post1"