So I’m trying to wrap my head around snippets and imports, and trying to apply it to the following:
$ tree /config
├── Caddyfile
└── domains
├── domain1.com
└── domain2.com
$ cat /config/Caddyfile
import domains/*
If I modify Caddyfile
to the following:
(test) {
root /www
}
import domains/*
And try to use it in domains/domain1.com
like so:
foo.domain1.com {
import test
}
I get the following error:
“Error during parsing: File to import not found: /config/domains/test”
If I create the snippet in domains/domain1.com
(where I use it), I get the same error
So what I gathered from this is that I can’t use snippets in imported files, this seems unintentional / bugged.