You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you may want to include an external file in your project. Currently, you can either encode the file as base64 using a snippet helper, or rely on a separate bash script that runs beforehand.
It would be helpful to introduce a new helper: copyFile. This helper would copy the specified file into the output directory, prefix the filename with a random string to avoid name clashes, and return the new path.
In some cases, you might want to copy a file as part of the build process without including its path in the rendered output. To support this use case, the helper could accept an optional silent=true flag:
{{copyFile'../../../docs/README.pdf'silent=true}}
This would copy the file to the output directory as usual, but return nothing to the template.
This could be done by looking at the source path and coping the same file only once, using a dedicated attribute would make changing the source much easier.
Activity
jneug commentedon Jan 23, 2026
Maybe add an
idattribute (orpermidto keep naming consistent) that allows referencing the file later on the page or from other pages?This could be done by looking at the source path and coping the same file only once, using a dedicated attribute would make changing the source much easier.
mikebarkmin commentedon Jan 26, 2026
That's a good idea. 👍