diff options
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r-- | cgitrc.5.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 60159f6..78f33c8 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt | |||
@@ -564,6 +564,35 @@ specification with the relevant string; available values are: | |||
564 | 'exec:':: | 564 | 'exec:':: |
565 | The default "one process per filter" mode. | 565 | The default "one process per filter" mode. |
566 | 566 | ||
567 | 'lua:':: | ||
568 | Executes the script using a built-in Lua interpreter. The script is | ||
569 | loaded once per execution of cgit, and may be called multiple times | ||
570 | during cgit's lifetime, making it a good choice for repeated filters | ||
571 | such as the 'email filter'. It responds to three functions: | ||
572 | |||
573 | 'filter_open(argument1, argument2, argument3, ...)':: | ||
574 | This is called upon activation of the filter for a particular | ||
575 | set of data. | ||
576 | 'filter_write(buffer)':: | ||
577 | This is called whenever cgit writes data to the webpage. | ||
578 | 'filter_close()':: | ||
579 | This is called when the current filtering operation is | ||
580 | completed. | ||
581 | |||
582 | Additionally, cgit exposes to the Lua the following built-in functions: | ||
583 | |||
584 | 'html(str)':: | ||
585 | Writes 'str' to the webpage. | ||
586 | 'html_txt(str)':: | ||
587 | HTML escapes and writes 'str' to the webpage. | ||
588 | 'html_attr(str)':: | ||
589 | HTML escapes for an attribute and writes "str' to the webpage. | ||
590 | 'html_url_path(str)':: | ||
591 | URL escapes for a path and writes 'str' to the webpage. | ||
592 | 'html_url_arg(str)':: | ||
593 | URL escapes for an argument and writes 'str' to the webpage. | ||
594 | |||
595 | |||
567 | Parameters are provided to filters as follows. | 596 | Parameters are provided to filters as follows. |
568 | 597 | ||
569 | about filter:: | 598 | about filter:: |