Set output dir to 'html/'; build css

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-16 20:18:04 -07:00
parent c87a2314c5
commit b453dfffc1
3 changed files with 9 additions and 4 deletions

2
.gitignore vendored
View File

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

1
html
View File

@ -1 +0,0 @@
www

View File

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