How to provide assets (image files) with a template so that they could eventually be overwritten?

Hi there,

I believe this PR contains the answer to your question. It’s not released yet but you can access it: packages/docs/resources.md at 07b827f8915838224b2ff9aee162cf0e0c86d092 · typst/packages · GitHub

The proper way to let the people using your template overwrite the file to use is to take content as an argument directly, not a string. For example, you should replace this:

#let cover-page(logo-path: "logo.png", title) = {
  image(logo-path)
  heading(title)
}

With something like:

#let cover-page(logo: image("logo.png"), title) = {
  logo
  heading(title)
}

EDIT: Also this:

3 Likes