Can I define a dedicated/default Template folder?

Can I create a default (dedicated) template folder, where I put my template(s) and then only #import using the filename without the complete path?

You can store your templates in a local package namespace. For this, you need to put your template package in a specific directory, depending on your operating system:

  • Windows: %APPDATA%\typst\packages\<namespace>\<name>\<version>
  • macOS: ~/Library/Application Support/typst/packages/<namespace>/<name>/<version>
  • Linux: ~/.local/share/typst/packages/<namespace>/<name>/<version> (or via the environment variable $XDG_DATA_HOME, see the above link)

For <namespace>, you can use whatever you want, but something like local or templates would probably be a sensible choice. Additionally, all your templates need a name and a version. You can then import a template from your Typst document via

#import "@<namespace>/<name>:<version>": *
2 Likes

Taht is exactly what I was looking for. Thank You