mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 14:06:17 -04:00
docs: Add missing docs for import directive
This commit is contained in:
parent
00c3d67077
commit
5f1bd6374f
3 changed files with 31 additions and 0 deletions
26
src/docs/markdown/caddyfile/directives/import.md
Normal file
26
src/docs/markdown/caddyfile/directives/import.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: import (Caddyfile directive)
|
||||
---
|
||||
|
||||
# import
|
||||
|
||||
Includes a [snippet](/docs/caddyfile/concepts#snippets) or file, replacing this directive with the contents of the snippet or file.
|
||||
|
||||
This directive is a special case: it is evaluated before the structure is parsed, and it can appear anywhere in the Caddyfile.
|
||||
|
||||
## Syntax
|
||||
|
||||
```
|
||||
import <pattern>
|
||||
```
|
||||
|
||||
- **<pattern>** is the filename, glob pattern, or name of [snippet](/docs/caddyfile/concepts#snippets) to include. Its contents will replace this line as if that file's contents appeared here to begin with. It is an error if a specific file cannot be found, but an empty glob pattern is not an error.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
Import all files in an adjacent sites-enabled folder:
|
||||
|
||||
```
|
||||
import sites-enabled/*
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue