## requirements

`pandoc` utility must be installed

- Debian Bookworm:

      $ apt-get update && apt-get install -y pandoc

## start default openresty

1. Run `docker run --rm -it --init -w /opt -v $PWD:/opt -p 80:80 openresty/openresty:1.27.1.2-0-bookworm-buildpack`
2. Visit `localhost` in web browser.

## start a custom site

### build docker image

    $ docker build -t sitegen-openresty .

### generate a new site file

    $ docker run --rm -w /opt -v $PWD:/opt sitegen-openresty sitegen new

### add an index page

    $ docker run --rm -w /opt -v $PWD:/opt sitegen-openresty sitegen page /opt/ index

### add to `site.moon`

    add "index.md"

### add config for nginx

    $ mkdir logs/ conf/

    # conf/nginx.conf
    worker_processes  1;
    error_log logs/error.log;
    events {
        worker_connections 1024;
    }
    http {
        server {
            listen 8080;
            location / {
                default_type text/html;
            }
        }
    }

### build site

    $ docker run --rm -w /opt/app -v $PWD:/opt/app sitegen-openresty sitegen

### start server

    $ docker run --rm -it --init -v $PWD:/opt/app -p 8080:8080 sitegen-openresty

### visit `localhost:8080` in web browser

## todo

* titleize slugs

* treesitter highlighting for moonscript
* penlight library
* sitegen plugins
