Update README.md

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-14 14:26:42 -07:00
parent 576090d065
commit a0f18520cb

View File

@ -15,15 +15,19 @@
### build docker image ### build docker image
$ docker build -t sitegen-openresty . $ make image-build
### rebuild an existing docker image
$ make image-rm image-build
### generate a new site file ### generate a new site file
$ docker run --rm -w /opt -v $PWD:/opt sitegen-openresty sitegen new $ docker run --rm -w /opt/app -v $PWD:/opt/app miti.sh sitegen new
### add an index page ### add an index page
$ docker run --rm -w /opt -v $PWD:/opt sitegen-openresty sitegen page /opt/ index $ docker run --rm -w /opt/app -v $PWD:/opt/app miti.sh sitegen page /opt/app index
### add to `site.moon` ### add to `site.moon`
@ -50,17 +54,9 @@
### build site ### build site
$ docker run --rm -w /opt/app -v $PWD:/opt/app sitegen-openresty sitegen
or
$ make build $ make build
### start server ### start dev server
$ docker run --rm -it --init -v $PWD:/opt/app -p 8080:8080 sitegen-openresty
or
$ make $ make
@ -70,6 +66,10 @@ Visit `localhost:8080` in web browser
$ docker exec -it container_name sitegen watch $ docker exec -it container_name sitegen watch
### run tests
$ make test
### lint moonscript ### lint moonscript
$ make lint $ make lint
@ -82,10 +82,6 @@ example:
$ pygmentize -S default -f html $ pygmentize -S default -f html
### run tests
$ make test
## gotchas ## gotchas
### What is error `cosmo failed: [string "..."]:62: cannot resume dead coroutine`? ### What is error `cosmo failed: [string "..."]:62: cannot resume dead coroutine`?
@ -104,8 +100,7 @@ to return `nil`, you will see this cryptic error:
Delete your `.sitegen_cache` file. Delete your `.sitegen_cache` file.
## todo ## thinking about
* draft documents * draft documents
* treesitter highlighting for moonscript * treesitter highlighting for moonscript
* penlight library