This commit is contained in:
Catalin Constantin Mititiuc 2025-06-16 20:18:05 -07:00
parent 9b4ab48705
commit f15f3f5011
3 changed files with 18 additions and 3 deletions

View File

@ -74,9 +74,17 @@ Visit `localhost:8080` in web browser
$ make lint $ make lint
### print out pygments styles
$ pygmentize -S STYLE -f formatter
example:
$ pygmentize -S default -f html
## gotchas ## gotchas
### What is `cosmo failed: [string "..."]:62: cannot resume dead coroutine`? ### What is error `cosmo failed: [string "..."]:62: cannot resume dead coroutine`?
If you call `cosmo.yield`, your function **must** return `nil`! If you forget If you call `cosmo.yield`, your function **must** return `nil`! If you forget
to return `nil`, you will see this cryptic error: to return `nil`, you will see this cryptic error:
@ -84,6 +92,14 @@ to return `nil`, you will see this cryptic error:
Error: index.html -> html/index.html: cosmo failed: [string "..."]:62: cannot resume dead coroutine Error: index.html -> html/index.html: cosmo failed: [string "..."]:62: cannot resume dead coroutine
make: *** [Makefile:6: build] Error 1` make: *** [Makefile:6: build] Error 1`
### What is error `calling 'load_cache' on bad self`?
moon: .../local/openresty/luajit/share/lua/5.1/sitegen/common.lua:41:
/usr/local/openresty/luajit/share/lua/5.1/sitegen/cache.lua:99: calling
'load_cache' on bad self (table expected, got userdata) stack traceback:
Delete your `.sitegen_cache` file.
## todo ## todo
* draft documents * draft documents

1
html/.gitignore vendored
View File

@ -1,5 +1,6 @@
app.css app.css
index.html index.html
moonscript.css
posts/build-a-neovim-qt-appimage-from-source.html posts/build-a-neovim-qt-appimage-from-source.html
posts/build-static-website-generator-part-1.html posts/build-static-website-generator-part-1.html
posts/deploy-elixir-generated-html-with-docker-on-digitalocean.html posts/deploy-elixir-generated-html-with-docker-on-digitalocean.html

View File

@ -127,7 +127,5 @@ sitegen.create =>
moonscript_header = header\gsub "%.%.%.", "}" moonscript_header = header\gsub "%.%.%.", "}"
moonscript_header moonscript_header
copy "moonscript.py"
copy "pygments.lua"
copy "app.css" copy "app.css"
copy "moonscript.css" copy "moonscript.css"