diff options
author | Omar Polo <op@omarpolo.com> | 2021-07-09 12:50:24 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-07-09 12:50:24 +0000 |
commit | 528f37cd2dbed6a7906e3adb96c12f44acba919d (patch) | |
tree | 55ff15171838b80e6e2e0589c89ce0cc0f0010f8 /gmid.1 | |
parent | 67f494057aa3a0a32cc4d948cff2f27ef9de2340 (diff) |
sync macro usage and mention the `include' keyword
Diffstat (limited to 'gmid.1')
-rw-r--r-- | gmid.1 | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -156,7 +156,9 @@ block return 40 "temporary" "-" "failure" .Ed .Pp Furthermore, quoting is necessary only when a string needs to contain -spaces, something that looks like a number or a reserved keyword. +special characters +.Pq like spaces or punctuation , +something that looks like a number or a reserved keyword. The last example could have been written also as: .Bd -literal -offset indent block return 40 temporary "-" failure @@ -169,6 +171,18 @@ blocks. However, defining all the .Ic server blocks after the macros and the global options is recommended. +.Pp +Newlines are often optional, except around top-level instructions, and +semicolons +.Dq \&; +can also be optionally used to separate options. +.Pp +Additional configuration files can be included with the +.Ic include +keyword, for example: +.Bd -literal -offset indent +include "/etc/gmid.conf.local" +.Ed .Ss Macros Macros can be defined that will later be expanded in context. Macro names must start with a letter, digit or underscore and may @@ -176,15 +190,25 @@ contain any of those characters. Macros names may not be reserved words. Macros are not expanded inside quotes. .Pp +Two kinds of macros are supported: variable-like and proper macros. +When a macro is invoked with a +.Dq $ +before its name its expanded as a string, whereas when it's invoked +with a +.Dq @ +its expanded in-place. +.Pp For example: .Bd -literal -offset indent dir = "/var/gemini" cert = "/etc/keys" +common = "lang it; auto index on" server "foo" { root $dir "/foo" # -> /var/gemini/foo cert $cert "/foo.crt" # -> /etc/keys/foo.crt key $cert "/foo.pem" # -> /etc/keys/foo.pem + @common } .Ed .Ss Global Options |