From 2eedcdb983b9b62b497f26ea32714e84cda8e763 Mon Sep 17 00:00:00 2001 From: Qrius Date: Fri, 3 Jan 2025 07:42:25 +0100 Subject: Add comments about feature flags --- smp.1 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/smp.1 b/smp.1 index 913227a..91e76fd 100644 --- a/smp.1 +++ b/smp.1 @@ -9,7 +9,7 @@ Skaldpress Macro Processor \- Macro processor smp is a macro processor, made specifically for a usecase when doing templating of websites. -Macros +.SS Macros .IP "\fBinclude()\fR" Includes a file in-place, performing macro-expansion on it. NOTE, THERE IS NO LOOP PROTECTION HERE! @@ -67,6 +67,32 @@ If compiled with \fBdeadlinks\fR, this macro will always return it's argument. But it will also perform a request to the link, and emit a warning if it it doesn't return HTTP 200 OK. This will significantly slow down compile times! +.SS "\fBCompile-Time Feature Flags\fR" +There are some compile-time flags that can enable/disable features, most are enabled by default, +and exist either because they trigger a external dependency, or because they are unlikely to work without glibc. + +.IP "\fBreadline\fR" 2 +\fBEnabled by default\fR. +Enables the use of libc readline in REPL mode. If not enabled, normal stdio will be used for input. + +.IP "\fBtime\fR" 2 +\fBEnabled by default\fR. +Enables the \fIformat_time\fR-macro, this will compile the chrono dependency to format time. + +.IP "\fBmarkdown\fR" 2 +\fBEnabled by default\fR. +Enabled the \fIhtml_from_markdown\fR-macro, this will compile the markdown dependency. And can convert markdown into html. + +.IP "\fBdeadlinks\fR" 2 +\fBEnabled by default\fR. +Enabled the \fIwodl\fR-macro, this will compile the minreq dependency. +Allows testing the return code of links, and warns when the request is unsuccessful. + +.IP "\fBguile\fR" 2 +If compiled with guile, the macro processor supports running guile-code inline. +This is enabled with \fI%()%\fR in the input, and anything inside the parantheses will be evaluated as guile. + +\fBExperimental feature!\fR .SH OPTIONS If a input file is provided, that will be processed. If not, a sort of interactive REPL will be started instead. -- cgit v1.2.3