diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -24,6 +24,10 @@ Listening on http://127.0.0.1:8000 By default GitPad is in single-user mode, serving the branch pointed to by `HEAD`. +**WARNING**: The `lua` feature is enabled by default. Lua sandboxing is still +experimental, so giving users access who you don't trust might lead to a system +compromise. + ## Multi-user mode Multi-user mode requires you to set up a reverse-proxy that authenticates users @@ -76,6 +80,20 @@ name = "John Doe" email = "john@example.com" ``` +## Lua scripting + +Files can start with a shebang like `#!hello`, which will +interpret the following text with the `view` function returned +by in this case `bin/hello.lua`, e.g. + +```lua +function view(text) + return '<pre>' .. gitpad.html_escape(string.upper(text)) .. '</pre>' +end + +return {view=view} +``` + ## Contributing Feedback, bug reports and suggestions are welcome! |