Is it possible to have a custom export button that changes the theme/appearance settings?

59 views
Skip to first unread message

Ibby EL-Serafy

unread,
Feb 7, 2020, 2:49:14 PM2/7/20
to TiddlyWiki
Due to my laptop being very slow, and the resource usage of the node server, I've ended using timimi, which works with single file wikis.

So I have a single file wiki I use privately.

I would like, either through a button or command line script, to export a public version. Here are my requirements:

  1. The exported wiki contains tiddlers marked public as well as all necessary shadow tiddlers
  2. The exported wiki has a different theme
  3. The exported wiki has different appearance settings  
It would be nice, but not necessary, if the whole build and publish process can be done from one place. For example a single command line tool that builds the public version of the wiki the publishes to now/netlify/ghpages. (maybe with testing, but that's a bit too ambitious....)

Resources
`$:/_publicexport` :
\define saveTiddlerFilter()
[is[tiddler]] -[[$:/boot/boot.css]] -[[$:/HistoryList]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]]  
[all[shadows+tiddlers]tag[public]]
+[sort[title]]
\end
{{$:/
core/templates/tiddlywiki5.html}}Enter code here...

 Button:
<$button message="tm-download-file" param="$:/_publicexport">
export public
</$button>
Enter code here...
 
Could I do something with this by using a custom template file instead of
$:/core/templates/tiddlywiki5.html

?

---


I can perhaps use some inspiration from the publish button on this tiddlywiki example

---

TW5 Farm seems cool, but I don't think it quite does anything I need.

Dumb Idea
Copy my wiki file, set theme and appearance settings the way I want. Diff the public & private files and create a script that makes those same changes. Can't help but feel this is the wrong way to go about it though.

So I am trying to figure this out on my own, but am quite slow, would appreciate any help along the way. I also realise maybe having multiple is a better way to go about it, but trying to work within the resources of old laptop for now.

Ibby (parc6502)

unread,
Feb 8, 2020, 10:15:46 AM2/8/20
to TiddlyWiki
An alternative that might work well for me (and others who would like a public + private wiki):

Add button on the private wiki that allows me to push a tiddler to a public tiddlywiki node server. Although I think I prefer the build then publish route (maybe just because that's what I'm used to with my static sites).

I guess one model of thought is that the private wiki could be like an offline CMS for the onliine wiki.

TonyM

unread,
Feb 8, 2020, 5:16:03 PM2/8/20
to TiddlyWiki
I think you will find there is at least half a dozen ways to do this.

In the single file and server you should be able to.

If you use the innerwiki plugin you can set the toddlers to be included along with the core. In the innerwiki you can save/download it to the published wiki.

Yes we can make a custom export.

Tony


Reply all
Reply to author
Forward
0 new messages