import { getPath } from "https://deno.land/x/eta@v2.0.0/file-utils.ts";
Get the absolute path to an included template
If this is called with an absolute path (for example, starting with '/' or 'C:') then Eta will attempt to resolve the absolute path within options.views. If it cannot, Eta will fallback to options.root or '/'
If this is called with a relative path, Eta will:
- Look relative to the current template (if the current template has the
filename
property) - Look inside each directory in options.views
Note: if Eta is unable to find a template using path and options, it will throw an error.
Parameters
options: EtaConfig
compilation options