"Download a Web Site" for Ink using Borogrove

I’m finding Borogrove incredibly handy for quickly writing and testing Ink projects, but the “Download a Web Site” option flat-out does not seem to work. It says “You’ll need to upload it online to a personal web site or a service like Itch.io” but the release.zip it gives me contains only story.js and an empty folder named “release” so Itch, unsurprisingly, says “Failed to find index.html.” I’m not super familiar with Ink but it’s apparent even to me that what I’m getting out of Borogrove has no hope of running in a browser as-is.

My question is: is there something I can do in Borogrove to fix this? Has anybody managed to get a web-playable Ink game out of it directly? Failing that, is there some way I can keep a sort of blank Ink template on my computer and simply shove files from Borogrove into that (similar to Inky’s “export story.js only” feature)?

If it gives you a story.js, chances are that it will work with Inky’s template if configured to load story.js.

Let’s make a template:

  • Create a new Inky file, call it story.ink (the export in the next step will reuse that name for the js file => story.js)
  • Export it in Inky (export for web), keep the generated folder as your template. You can discard the story.ink file now.

Inky ships with an older version of inkjs than Borogove does. So we need to update it.

Now we have a template folder containing:

ink-template
├── index.html        <- the title of your story is defined here
├── ink.js            <- that the updated version of the inkjs engine
├── main.js
├── story.js          <- this is the example story compiled by Inky
└── style.css

Using the template

  • Duplicate your template folder for a new project
  • Replace its story.js file with the one from Borogove
  • Edit the index.html to change the <title>

EDIT: modified to provide a complete solution in one post.

2 Likes

I’ve filed an issue on Borogove’s repository.

2 Likes

Unfortunately, it does not! Replacing the Inky-produced story.js with the Borogrove-produced one results in the title appearing (I think from index.html itself) but nothing else:


This was the first workaround I tried, and though I suspect it’s probably not too far off being a viable option I don’t have the know-how to take it that last step of the way. Also, possibly more importantly, that extra step is likely to make it more hassle to rely on Borogrove than to switch to Inky for exporting (though I would very much still like the option for occasions when it’s impractical to install anything). Trying to identify what’s going wrong, I notice that Borogrove’s story.js file begins window.storyContent = { where Inky’s begins var storyContent = { (but simply replacing the former with the latter still isn’t sufficient).

Thanks for filing the issue, by the way!

Hrm. window.storyContent and var storyContent should be equivalent enough to work. If you pull up the browser’s JavaScript console (usually F12?) are there any errors?

1 Like

I took some time to actually test it.
The error is indeed right there in the console:
Version of ink used to build story was newer than the current version of the engine

Inky ships with an older version of inkjs than Borogove does.
We can update it: replace Inky’s ink.js file with the one from the latest release: https://github.com/y-lohse/inkjs/releases/download/v2.2.2/inkjs-2.2.2.zip

3 Likes

Thank you! This works, and being merely a matter of swapping in two files rather than one it’s simple enough to be an effective stopgap solution. (I think without being able to run Inky at all it would also be necessary to edit index.html to show the correct title, but that’s a comparatively trivial extra one-off task.)

I feel as though it might be worth marking this as the solution, but I don’t know if that’ll cause confusion without the note about moving across story.js as well. Would it be worth editing that in, is it fine to tag this as the solution as-is, or is nobody else realistically likely to run into the exact same issue anyway?

1 Like

I’ve completely rewritten my answer so everything is in one place.

3 Likes

That’s absolutely fantastic! Thank you so much for all the work you’ve put into this. I probably will end up pointing other people towards this topic so it’s great to have all the key details in the same reply.