diff --git a/.gitignore b/.gitignore index 6d388c7..42ace9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/www/ +/html/ /logs/ /*_temp/ diff --git a/html b/html deleted file mode 120000 index baf12b4..0000000 --- a/html +++ /dev/null @@ -1 +0,0 @@ -www \ No newline at end of file diff --git a/site.moon b/site.moon index 07b1183..318360d 100644 --- a/site.moon +++ b/site.moon @@ -1,5 +1,7 @@ sitegen = require "sitegen" lfs = require "lfs" +tools = require "sitegen.tools" +site = require "sitegen.site" rootname = (str) -> result = string.gsub str, "%..+", "" @@ -16,6 +18,11 @@ posts = (path=".") -> files = [file for file in lfs.dir path when file != "." and file != ".."] {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 => @title = "Hello World" @app_name = "stasis" @@ -23,5 +30,4 @@ sitegen.create => add "index.md" add path, target: target for path, target in pairs posts "docs" - css = require("sitegen.tools").system_command "cat < %s > %s", "css" - build css, "index.css" + build(css, "app.css")