Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


The idea is to use crater to take in user supplied Markdown and convert it to usable html to one day be used in crescent (and maybe any other lua app that needs safe markdown -> html). The idea of decoupling this from the main code is to allow modules to be added while the rest of the site is still running (to help with runtime and avoid doing things like putting module code in sql databases)

This is still in development, but will hopefully be able to do the all of the following successfully:

  1. It converts the markdown safely to html using hoedown
  2. This is followed by a sanitization process to ensure that no malicious code is put up on the server
  3. It needs some wiki-specific things (like easy URL linking)
  4. The above are crucial, but I want it to be easily configurable/extendable via modules (such as allowing syntax highlighting or executing code blocks in sandboxed environments)

It's currently just a POC to see if it's possible to call out to an internal api and use it for creating usable HTML.


You can build and run using the Dockerfile! Or, if you have openresty and luarocks (v2.2.2+ required) installed locally, you can install all the dependencies as follows:

luarocks build --only-deps crater-dev-1.rockspec

and then fire up nginx using nginx.conf


The api is fairly straightforward. It just takes a POST request on http://localhost:80 with a request body as follows:

markdown=##This is my sweet markdown

Isn't it **beautiful?**

and returns an html response. The API might change as I read more into best practices for internal APIs.

Docker Pull Command
Source Repository