[Help] Creating a button to save locally, and button to save to TidddlyHost?

Currently, I use TiddlyHost to host a TW, but would like to make my save button save a local copy of my TW, as well as make a button that would allow me to save my edits to TiddlyHost.

I’ve seen a similar post here but it’s a bit outside of what I know what to do with, since it’s set to save to Github

Any help with this would be appreciated!

2 Likes

Welp! Found a way to do it!

It’s not the prettiest thing in the world, but after taking a look at the download empty.html button on the main tiddlywiki website, I made this:

Title = '$:/JMH/ui/Buttons/DownloadWiki'
Tags  = '$:/tags/PageControls'
Text  = '<$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-download-file"/>
{{$:/core/images/download-button}}
</$button>'

With my save button set to upload to TiddlyHost, this does exactly what i need it to do!

2 Likes

Nice!

I’m not sure how to make it a button with an icon, but linking to https://sitename.tiddlyhost.com/download is another way to download a Tiddlyhost site. See https://simon.tiddlyhost.com/#Download%20link%20demo .

Using that kind of download link means the downloaded file doesn’t try to use “save to Tiddlyhost” if you click save, (which is good thing because it won’t work). Tiddlyhost does some tweaking of the downloaded file for that reason. But it does mean you’d have to save to Tiddlyhost first before downloading to make sure you download the latest changes.