Set output dir to 'html/'; build css

This commit is contained in:
Catalin Constantin Mititiuc 2025-05-10 08:32:55 -07:00
parent 73a5cd7122
commit aa5cfceb08
3 changed files with 9 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
/www/
/html/
/logs/
/*_temp/

1
html
View File

@ -1 +0,0 @@
www

View File

@ -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")