Skip to content

Commit 16f6e9e

Browse files
committed
a
1 parent fb7749d commit 16f6e9e

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The build system will look for these libraries and enable/link if available.
6363
- Client libraries for either [MySQL](https://dev.mysql.com) or [MariaDB](https://mariadb.org)
6464
- [SQLite 3](http://sqlite.org)
6565

66-
> :bulb: **Note:** On some systems,
66+
> [!NOTE] On some systems,
6767
> [libucontext](https://github.com/kaniini/libucontext) will be downloaded
6868
> and built alongside Lwan. This will require a network connection, so keep
6969
> this in mind when packaging Lwan for non-x86_64 or non-aarch64
@@ -133,7 +133,7 @@ Passing `-DCMAKE_BUILD_TYPE=Release` will enable some compiler
133133
optimizations (such as [LTO](http://gcc.gnu.org/wiki/LinkTimeOptimization))
134134
and tune the code for current architecture.
135135

136-
> :exclamation: **Important:** *Please use the release build when benchmarking*.
136+
> [!IMPORTANT] *Please use the release build when benchmarking*.
137137
> The default is the Debug build, which not only logs all requests to the
138138
> standard output, but does so while holding a lock, severely holding down
139139
> the server.
@@ -199,7 +199,7 @@ Running
199199
Set up the server by editing the provided `lwan.conf`; the format is
200200
explained in details below.
201201

202-
> :bulb: **Note:** Lwan will try to find a configuration file based in the
202+
> [!NOTE] Lwan will try to find a configuration file based in the
203203
> executable name in the current directory; `testrunner.conf` will be used
204204
> for the `testrunner` binary, `lwan.conf` for the `lwan` binary, and so on.
205205
@@ -213,7 +213,7 @@ settings for the environment it's running on. Many of these settings can
213213
be tweaked in the configuration file, but it's usually a good idea to not
214214
mess with them.
215215

216-
> :magic_wand: **Tip:** Optionally, the `lwan` binary can be used for one-shot
216+
> [!TIP] Optionally, the `lwan` binary can be used for one-shot
217217
> static file serving without any configuration file. Run it with `--help`
218218
> for help on that.
219219
@@ -231,7 +231,7 @@ can be empty; in this case, curly brackets are optional.
231231
an implementation detail, code reading configuration options will only be
232232
given the version with underscores).
233233

234-
> :magic_wand: **Tip:** Values can contain environment variables. Use the
234+
> [!TIP] Values can contain environment variables. Use the
235235
> syntax `${VARIABLE_NAME}`. Default values can be specified with a colon
236236
> (e.g. `${VARIABLE_NAME:foo}`, which evaluates to `${VARIABLE_NAME}` if
237237
> it's set, or `foo` otherwise).
@@ -281,7 +281,7 @@ just added together; for instance, "1M 1w" specifies "1 month and 1 week"
281281
| `M` | 30-day Months |
282282
| `y` | 365-day Years |
283283

284-
> :bulb: **Note:** A number with a multiplier not in this table is ignored; a
284+
> [!NOTE] A number with a multiplier not in this table is ignored; a
285285
> warning is issued while reading the configuration file. No spaces must
286286
> exist between the number and its multiplier.
287287
@@ -335,7 +335,7 @@ e.g. instantiating the `serve_files` module, Lwan will refuse to
335335
start. (This check is only performed on Linux as a safeguard for
336336
malconfiguration.)
337337

338-
> :magic_wand: **Tip:** Declare a Straitjacket right before a `site` section
338+
> [!TIP] Declare a Straitjacket right before a `site` section
339339
> in such a way that configuration files and private data (e.g. TLS keys)
340340
> are out of reach of the server after initialization has taken place.
341341
@@ -375,7 +375,7 @@ actual values while servicing requests. These include but is not limited to:
375375
- `Transfer-Encoding`
376376
- All `Access-Control-Allow-` headers
377377

378-
> :bulb: **Note:** Header names are also case-insensitive (and case-preserving). Overriding
378+
> [!NOTE] Header names are also case-insensitive (and case-preserving). Overriding
379379
> `SeRVeR` will override the `Server` header, but send it the way it was
380380
> written in the configuration file.
381381
@@ -385,11 +385,11 @@ Only two listeners are supported per Lwan process: the HTTP listener (`listener`
385385
section), and the HTTPS listener (`tls_listener` section). Only one listener
386386
of each type is allowed.
387387

388-
> :warning: **Warning:** TLS support is experimental. Although it is stable
388+
> [!WARNING] TLS support is experimental. Although it is stable
389389
> during initial testing, your mileage may vary. Only TLSv1.2 is supported
390390
> at this point, but TLSv1.3 is planned.
391391
392-
> :bulb: **Note:** TLS support requires :penguin: Linux with the `tls.ko`
392+
> [!NOTE] TLS support requires :penguin: Linux with the `tls.ko`
393393
> module built-in or loaded. Support for other operating systems may be
394394
> added in the future. FreeBSD seems possible, other operating systems
395395
> do not seem to offer similar feature. For unsupported operating systems,
@@ -409,11 +409,11 @@ where the TLS certificate and private key files are located) and takes an
409409
optional boolean `hsts` key, which controls if `Strict-Transport-Security`
410410
headers will be sent on HTTPS responses.
411411

412-
> :magic_wand: **Tip:** To generate these keys for testing purposes, the
412+
> [!TIP] To generate these keys for testing purposes, the
413413
> OpenSSL command-line tool can be used like the following:
414414
> `openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 7`
415415
416-
> :bulb: **Note:** It's recommended that a [Straitjacket](#Straitjacket) with a `chroot` option is declared
416+
> [!NOTE] It's recommended that a [Straitjacket](#Straitjacket) with a `chroot` option is declared
417417
> right after a `tls_listener` section, in such a way that the paths to the
418418
> certificate and key are out of reach from that point on.
419419
@@ -467,7 +467,7 @@ section can be present in the declaration of a module instance. Handlers do
467467
not take any configuration options, but may include the `authorization`
468468
section.
469469

470-
> :magic_wand: **Tip:** Executing Lwan with the `--help` command-line
470+
> [!TIP] Executing Lwan with the `--help` command-line
471471
> argument will show a list of built-in modules and handlers.
472472
473473
The following is some basic documentation for the modules shipped with Lwan.
@@ -490,7 +490,7 @@ best to serve files in the fastest way possible according to some heuristics.
490490
| `read_ahead` | `int` | `131702` | Maximum amount of bytes to read ahead when caching open files. A value of `0` disables readahead. Readahead is performed by a low priority thread to not block the I/O threads while file extents are being read from the filesystem. |
491491
| `cache_for` | `time` | `5s` | Time to keep file metadata (size, compressed contents, open file descriptor, etc.) in cache |
492492

493-
> :bulb: **Note:** Files smaller than 16KiB will be compressed in RAM for
493+
> [!NOTE] Files smaller than 16KiB will be compressed in RAM for
494494
> the duration specified in the `cache_for` setting. Lwan will always try
495495
> to compress with deflate, and will optionally compress with Brotli and
496496
> zstd (if Lwan has been built with proper support).
@@ -534,7 +534,7 @@ Scripts can be served from files or embedded in the configuration file, and
534534
the results of loading them, the standard Lua modules, and (optionally, if
535535
using LuaJIT) optimizing the code will be cached for a while.
536536

537-
> :bulb: **Note:** Lua scripts can't use global variables, as they may be not
537+
> [!NOTE] Lua scripts can't use global variables, as they may be not
538538
> only serviced by different threads, but the state will be available only
539539
> for the amount of time specified in the `cache_period` configuration
540540
> option. This is because each I/O thread in Lwan will create an instance
@@ -549,7 +549,7 @@ the following signature: `handle_${METHOD}_${ENDPOINT}(req)`, where
549549
`${METHOD}` can be a HTTP method (i.e. `get`, `post`, `head`, etc.), and
550550
`${ENDPOINT}` is the desired endpoint to be handled by that function.
551551

552-
> :magic_wand: **Tip:** Use the `root` endpoint for a catchall. For example,
552+
> [!TIP] Use the `root` endpoint for a catchall. For example,
553553
> the handler function `handle_get_root()` will be called if no other handler
554554
> could be found for that request. If no catchall is specified, the server
555555
> will return a `404 Not Found` error.
@@ -599,7 +599,7 @@ The `rewrite` module will match
599599
to either redirect to another URL, or rewrite the request in a way that Lwan
600600
will handle the request as if it were made in that way originally.
601601

602-
> :information_source: **Info:** Forked from Lua 5.3.1, the regular expresion
602+
> [!INFORMATION] Forked from Lua 5.3.1, the regular expresion
603603
> engine may not be as feature-packed as most general-purpose engines, but
604604
> has been chosen specifically because it is a [deterministic finite
605605
> automaton](https://en.wikipedia.org/wiki/Deterministic_finite_automaton)
@@ -609,7 +609,7 @@ will handle the request as if it were made in that way originally.
609609
610610
The new URL can be specified using a simple text substitution syntax, or use Lua scripts.
611611

612-
> :magic_wand: **Tip:** Lua scripts will contain the same metamethods
612+
> [!TIP] Lua scripts will contain the same metamethods
613613
> available in the `req` metatable provided by the Lua module, so it can be
614614
> quite powerful.
615615
@@ -686,7 +686,7 @@ pattern using the same substitution syntax used for the `rewrite as` or
686686
foo-%1-bar }` will substitute `%1` with the first match from the pattern
687687
this condition is related to.
688688

689-
> :bulb: **Note:** Conditions that do not require a section have to be written
689+
> [!NOTE] Conditions that do not require a section have to be written
690690
> as a key; for instance, `condition has_query_string = yes`.
691691
692692
For example, if one wants to send `site-dark-mode.css` if there is a
@@ -729,7 +729,7 @@ pattern (%g+) {
729729
}
730730
```
731731

732-
> :bulb: **Note:** In general, this is not necessary, as the file serving
732+
> [!NOTE] In general, this is not necessary, as the file serving
733733
> module will do this automatically and pick the smallest file available for
734734
> the requested encoding, but this shows it's possible to have a similar
735735
> feature by configuration alone.
@@ -775,7 +775,7 @@ Lwan and a [FastCGI](https://en.wikipedia.org/wiki/FastCGI) server
775775
accessible by Lwan. This is useful, for instance, to serve pages from a
776776
scripting language such as PHP.
777777

778-
> :bulb: **Note:** This is a preliminary version of this module, and
778+
> [!NOTE] This is a preliminary version of this module, and
779779
> as such, it's not well optimized, some features are missing, and
780780
> some values provided to the environment are hardcoded.
781781
@@ -798,7 +798,7 @@ section with a `basic` parameter, and set one of its options.
798798
| `realm` | `str` | `Lwan` | Realm for authorization. This is usually shown in the user/password UI in browsers |
799799
| `password_file` | `str` | `NULL` | Path for a file containing username and passwords (in clear text). The file format is the same as the configuration file format used by Lwan |
800800

801-
> :warning: **Warning:** Not only passwords are stored in clear text in a file
801+
> [!WARNING] Not only passwords are stored in clear text in a file
802802
> that should be accessible by the server, they'll be kept in memory for a few
803803
> seconds. Avoid using this feature if possible.
804804

0 commit comments

Comments
 (0)