docs: Remove sh language hint from Caddyfile examples (#207)

* Remove `sh` language hint from Caddyfile examples

* Fix mixed indentation chars to favor tabs in example Caddyfiles
This commit is contained in:
Cameron Martin 2024-09-23 15:55:38 -07:00 committed by GitHub
parent fe024904af
commit 2977c7faa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: 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 $ xcaddy build --embed ./my-files --embed ./my-other-files
$ cat Caddyfile $ cat Caddyfile
{ {
# You must declare a custom filesystem using the `embedded` module. # You must declare a custom filesystem using the `embedded` module.
# The first argument to `filesystem` is an arbitrary identifier # The first argument to `filesystem` is an arbitrary identifier
# that will also be passed to `fs` directives. # that will also be passed to `fs` directives.
filesystem my_embeds embedded filesystem my_embeds embedded
} }
localhost { localhost {
# This serves the files or directories that were # This serves the files or directories that were
# contained inside of ./my-files and ./my-other-files # contained inside of ./my-files and ./my-other-files
file_server { file_server {
fs my_embeds fs my_embeds
} }
@ -139,16 +139,16 @@ 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: 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 $ xcaddy build --embed foo:./sites/foo --embed bar:./sites/bar
$ cat Caddyfile $ cat Caddyfile
{ {
filesystem my_embeds embedded filesystem my_embeds embedded
} }
foo.localhost { foo.localhost {
# This serves the files or directories that were # This serves the files or directories that were
# contained inside of ./sites/foo # contained inside of ./sites/foo
root * /foo root * /foo
file_server { file_server {
fs my_embeds fs my_embeds
@ -156,8 +156,8 @@ foo.localhost {
} }
bar.localhost { bar.localhost {
# This serves the files or directories that were # This serves the files or directories that were
# contained inside of ./sites/bar # contained inside of ./sites/bar
root * /bar root * /bar
file_server { file_server {
fs my_embeds fs my_embeds