Hosting: Read-only-ready theme? And a single-file time-to-load question

  1. Is there a plugin to automatically upload the single file “index.html” tiddlywiki to a website, that upddates the whole look of the TW, so it acts kind of like a new theme, in that:
  • Removes all the edit buttons section, and
  • Also removes the whole sidebar, including search – everything
  1. When you upload the index.html as a website, will it take longer to load than a regular website since the file is 20 Mb?

  2. Is there a Github actions flow that can do #1 – Change theme, remove every editable feature – and publish it as a website

Uglifier can do some of this manually:

Uglifier — compress your tiddlywiki

There is probably a way to automate this process via GitHub actions doing some node.js stuff but I haven’t played around with that yet.

-Xyvir

Yes. Loading speeds will obviously be dependent on both your internet provider and your web host, but I’d recommend adding a splash screen if you notice more than a few seconds’ loading time. I find that CSS animations provide a good cue that something is happening without adding much to your total file size.

Alternatively, if you don’t need the dynamic functions of TW, you might considering using it to generate a static site. The individual pages would be much quicker to load and also more readily accessible to search engines, if that’s important to you.

3 Likes

Obviously larger files take longer to load, but this is not a difference between TiddlyWiki and “regular websites”.

Most of my TiddlyWikis are way smaller than 25MB, including serious workhorse wikis packed with content (with or without pointing to images which are hosted elsewhere). An empty TiddlyWiki is under 2MB. In comparison to one high-resolution photo (let alone video!), and the size of TiddlyWiki’s core immediately looks negligible.

If you say more about your situation, you may find even better advice.

For example, this may or may not appeal to your use-case, but here’s a fantastically convenient solution: I regularly work with TiddlyHost on sites that involve a workflow of ongoing frequent modification. For sites that aren’t about TiddlyWiki, I enable a read-only mode that appears for anyone other than me ( = anyone accessing a public site but without being logged in via my own account at TiddlyHost). So I get the best of both worlds: convenient editing whenever I load the site myself, and web-publication of those same files (in read-only format) with zero conversion effort.

1 Like

Can I keep the single file index.html as the main source of truth?
I’m ATM using the index.html file in iCloud along with the Quine.app and a local WebDavNavServer on desktop. I would prefer to keep this functionality - for quick edits on the go.

What I am asking is: Do I use a duplicate index.html that will then get converted → to a NodeJS project – while keeping the index.html safe somewhere else.
Or do I need to move the whole flow over to NodeJS

I’m afraid I don’t have any personal experience with either static site conversions or Node.js, but my understanding from the documentation is that you would need to switch to a Node.js setup. It’s possible to convert single-file wikis to Node.js projects and vice versa (and there may be TW clients that simplify this process) but it might be tedious to do so on a regular basis, and I’d also be concerned about keeping both versions in sync.

Along with a splash screen you can use a Free CDN Content delivery Network, like Cloudflare to turbo charge load times and do so internationally, if you have/want an international audience.

  • Splash screens help by showing something is happening, so people don’t abandon, especially the first time (before local caching) but it is also an opportunity to boast “loading interactive features” because once loaded a self contained tiddlywiki is much more performant than other websites that separately load each page. After the initial load it need not return to the internet unless you use external files/images.

Personally I don’t see the value of a Static website if you can get an interactive one on the internet.

  • With the local storage plugin active they can also save updates/customisations in browser memory for when they return without saving to the server.

Tiddlyhost is easy, otherwise I have used tw-receiver on a cpanel account.

It is possible on a node implementation to simply save a copy of the wiki as a html, ie its trivial to convert to single file wiki unless you use external resources. Some automate this to upload the latest version.

Thanks, so far using zero external resources, will try the Node JS route!