Update import.md (#441)

This commit is contained in:
Paulo Vieira 2025-01-07 19:04:19 +00:00 committed by GitHub
parent 3900e91bee
commit dbd9cc7948
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,8 +35,8 @@ import <pattern> [<args...>] [{block}]
Note that prior to v2.7.0, the syntax was `{args.N}` but this form was deprecated in favor of the more flexible syntax above. Note that prior to v2.7.0, the syntax was `{args.N}` but this form was deprecated in favor of the more flexible syntax above.
⚠️ <i>Experimental</i> <span style='white-space: pre;'> | </span> <span>v2.9.x+</span> ⚠️ <i>Experimental</i> <span style='white-space: pre;'> | </span> <span>v2.9.x+</span>
- **{block...}** is an optional block to pass to the imported tokens. This placeholder is a special case, and is evaluated recursively at Caddyfile-parse-time, not at runtime. They can be used in two forms: - **{block}** is an optional block to pass to the imported tokens. This placeholder is a special case, and is evaluated recursively at Caddyfile-parse-time, not at runtime. They can be used in two forms:
- `{block}` where the content of provided block will be substituted for the placeholder. - `{block}` where the content of the whole provided block will be substituted for the placeholder
- `{blocks.key}` where `key` is the first token of a parameter within the provided block - `{blocks.key}` where `key` is the first token of a parameter within the provided block
@ -125,8 +125,8 @@ Import a snippet which provides extendable options for a reverse proxy:
```caddy ```caddy
(extendable-proxy) { (extendable-proxy) {
reverse_proxy { reverse_proxy {
{block.proxy_target} {blocks.proxy_target}
{block.proxy_options} {blocks.proxy_options}
} }
} }