← Back to context

Comment by schemescape

4 years ago

The simple answer to "why not run this in a web page?" is that I built this tool based on my own needs and I never had any need to run a file system-based tool in my browser.

On the other hand, if I wanted to ship something similar with a built-in editing experience, then I think running it in the browser would be the way to go. The problem I saw there (last time I checked) was that I couldn't write directories of files to the file system from a web page (and I definitely want to store everything in the file system).

> The problem I saw there (last time I checked) was that I couldn't write directories of files to the file system

You mean to an arbitrary path—why would this be necessary? The only write operation that most static site generators make use of is putting exactly one file tree somewhere after processing the input. The same thing is achieved by the browser's native Save File handling. If it were running in the browser, you'd generate a ZIP containing that file tree.

  • Saving a single zip file would work, thanks. But it still seems like a cumbersome workflow in this case because you’d have to unzip to view/upload the site.

    I do like the idea in other contexts, just not here.