Friends,
What’s the best way to have a hosted TW5 (say, on tiddlyhost) serve up a public face that’s free of most editing GUI (and other distracting technical stuff), while the same site remaining easy to edit on the fly?
To be clear: I understand many people may have a linear work flow for public files: develop the TW5, finalize the content, then convert to a readOnly theme (or even a static or stripped-down site) and publish; repeat the process for any necessary revisions down the road. This is not how things go for my projects.
Use case (to make the need vivid): I’m constantly updating the TW5 for my big university class; it’s very much a living database for which any workflow more complex than auto-save or one-click save is not practical.
Yet I don’t want students visiting the page to be overwhelmed by GUI elements that are irrelevant to them. I also prefer to keep some data “under the hood” – not necessarily encrypted or hacker-proof, but unlikely to surface for visitors poking around in obvious ways.
Currently, my workarounds include having the ViewToolbar appear only on hover, and tucking most controls (for both page and tiddlers) into the dropdown “more” controls. And then I use minimalist sidebar tabs, using various field-driven filter conditions to prevent technical or archival stuff taking up space in Recent menu, etc.
In TWClassic, it was quite easy to load a tiddlyspot site and hit a checkbox (tucked away where I could find it quickly) that toggled readOnly mode off. Changes to the checkbox setting were locally stored, and it defaulted to readOnly=yes for each session. So editing and saving the project did not require remembering to reverse the toggle (on pain of new visitors seeing the edit interface). If the parallel solution for TW5 is out there, I’ve lost track of it. (In early 2020, Jeremy generously set me up with a custom-hosted login-account solution that solved these problems and more during the peak online-teaching crisis, but that server-based setup made ongoing demands on his time, and it is overkill for my current needs.)
I’m sure I recall that there are ways to save variables locally (in a cookie or in session-specific browser memory) rather than in the tw file itself, but I don’t recall how that’s done. Presumably, this could unlock that same ability to start my editing sessions with one simple step that “unlocks” the editing interface and extra content, leveraging filter conditions in ViewTemplate items to check for the special (local or session-specific) value. Any TW-savvy visitor would be able to do the same, should they deduce or stumble across the trick, which is fine (so long as they can’t actually write changes to the server!).
Any best practices, or ingredients for a solution?
Thanks in advance!
-Springer