-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathinit.lua
More file actions
34 lines (34 loc) · 836 Bytes
/
init.lua
File metadata and controls
34 lines (34 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
local Site = require("sitegen.site")
local colors = require("ansicolors")
local create_site
create_site = function(init_fn, site)
if site == nil then
site = Site()
end
io.stderr:write(colors("%{bright}%{red}WARNING: %{reset}sitegen.create_site is deprecated, use create and add markdown files manually.\n"))
do
local _with_0 = site
_with_0:init_from_fn(init_fn)
if not (_with_0.autoadd_disabled) then
_with_0.scope:search("*md")
end
return _with_0
end
end
local create
create = function(init_fn, site)
if site == nil then
site = Site()
end
assert(init_fn, "Attempted to create site without initialization function")
do
local _with_0 = site
_with_0:init_from_fn(init_fn)
return _with_0
end
end
return {
create_site = create_site,
create = create,
VERSION = "0.4"
}