Skip to content

Commit

Permalink
docs: Remove sh language hint from Caddyfile examples (#207)
Browse files Browse the repository at this point in the history
* Remove `sh` language hint from Caddyfile examples

* Fix mixed indentation chars to favor tabs in example Caddyfiles
  • Loading branch information
camhux authored Sep 23, 2024
1 parent fe02490 commit 2977c7f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ This allows you to hack on Caddy core (and optionally plug in extra modules at t

If `--embed` is used without an alias prefix, the contents of the source directory are written directly into the root directory of the embedded filesystem within the Caddy executable. The contents of multiple unaliased source directories will be merged together:

```sh
```
$ xcaddy build --embed ./my-files --embed ./my-other-files
$ cat Caddyfile
{
# You must declare a custom filesystem using the `embedded` module.
# The first argument to `filesystem` is an arbitrary identifier
# that will also be passed to `fs` directives.
filesystem my_embeds embedded
# You must declare a custom filesystem using the `embedded` module.
# The first argument to `filesystem` is an arbitrary identifier
# that will also be passed to `fs` directives.
filesystem my_embeds embedded
}
localhost {
# This serves the files or directories that were
# contained inside of ./my-files and ./my-other-files
# This serves the files or directories that were
# contained inside of ./my-files and ./my-other-files
file_server {
fs my_embeds
}
Expand All @@ -139,25 +139,25 @@ localhost {

You may also prefix the source directory with a custom alias and colon separator to write the source directory's contents to a separate subdirectory within the `embedded` filesystem:

```sh
```
$ xcaddy build --embed foo:./sites/foo --embed bar:./sites/bar
$ cat Caddyfile
{
filesystem my_embeds embedded
filesystem my_embeds embedded
}
foo.localhost {
# This serves the files or directories that were
# contained inside of ./sites/foo
# This serves the files or directories that were
# contained inside of ./sites/foo
root * /foo
file_server {
fs my_embeds
}
}
bar.localhost {
# This serves the files or directories that were
# contained inside of ./sites/bar
# This serves the files or directories that were
# contained inside of ./sites/bar
root * /bar
file_server {
fs my_embeds
Expand Down

0 comments on commit 2977c7f

Please sign in to comment.