Set output dir to 'html/'; build css
This commit is contained in:
parent
73a5cd7122
commit
aa5cfceb08
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
/www/
|
/html/
|
||||||
/logs/
|
/logs/
|
||||||
/*_temp/
|
/*_temp/
|
||||||
|
10
site.moon
10
site.moon
@ -1,5 +1,7 @@
|
|||||||
sitegen = require "sitegen"
|
sitegen = require "sitegen"
|
||||||
lfs = require "lfs"
|
lfs = require "lfs"
|
||||||
|
tools = require "sitegen.tools"
|
||||||
|
site = require "sitegen.site"
|
||||||
|
|
||||||
rootname = (str) ->
|
rootname = (str) ->
|
||||||
result = string.gsub str, "%..+", ""
|
result = string.gsub str, "%..+", ""
|
||||||
@ -16,6 +18,11 @@ posts = (path=".") ->
|
|||||||
files = [file for file in lfs.dir path when file != "." and file != ".."]
|
files = [file for file in lfs.dir path when file != "." and file != ".."]
|
||||||
{join(path, file), target(file, "/posts") for _, file in ipairs files}
|
{join(path, file), target(file, "/posts") for _, file in ipairs files}
|
||||||
|
|
||||||
|
site!
|
||||||
|
site.config.out_dir = "html/"
|
||||||
|
|
||||||
|
css = tools.system_command "cat < %s > %s", "css"
|
||||||
|
|
||||||
sitegen.create =>
|
sitegen.create =>
|
||||||
@title = "Hello World"
|
@title = "Hello World"
|
||||||
@app_name = "stasis"
|
@app_name = "stasis"
|
||||||
@ -23,5 +30,4 @@ sitegen.create =>
|
|||||||
add "index.md"
|
add "index.md"
|
||||||
add path, target: target for path, target in pairs posts "docs"
|
add path, target: target for path, target in pairs posts "docs"
|
||||||
|
|
||||||
css = require("sitegen.tools").system_command "cat < %s > %s", "css"
|
build(css, "app.css")
|
||||||
build css, "index.css"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user