Creating subdirectories in a website template using (extras).txt

WI 25.13 and 25.14 demonstrate using a custom website template with a file (extras).txt to specify additional files to copy to the ProjectName.materials/Release directory.

Unfortunately, Inform doesn’t seem to be able to create subdirectories when copying files. For example, if I add a line in my (extras).txt file that says assets/image.png, Inform will provide an error on build:

Inform translated your source text as usual, to manufacture a ‘story file’: all of that worked fine. But the Release then went wrong, for the following reason:

  • Fatal error: unable to write to file: filename ‘/Users/weaver/Documents/Inform Projects/ProjectName.materials/Release/assets/image.png’

This is because the ProjectName.materials/Release/assets directory doesn’t exist. This can easily be solved by creating the directory manually, but that’s an unfortunate workaround to ask users to do if your entire Release/ directory is gitignored.

Is there an undocumented syntax for (extras).txt that permits Inform to create directories within Release/ on build?

Not that I know of, but I can think of one backhanded way to use a subdirectory:

Release along with a "Custom" interpreter and a "Custom" website.

Make your custom template double as an interpreter template. You’ll get an ‘interpreter’ subdirectory under Release that you can use like an assets subdir. Then put “interpreter/image.png” in your (extras).txt.