Instructions on deploying to an existing tw5 node server?
Hi,
Many thanks for your work on this! I am currently converting an old "mGSD classic" instance I was using to use GSD5.
I wondered if it might be worth adding instructions (or even a script) for users who wish to add GSD5 to an existing TW5 server instance? I see the repository contains a script for running GSD5 on node, but from what I can tell, it seems fairly tightly coupled to having a TW5 installation available at a particular location (namely, the neighbouring directory "../TiddlyWiki5", and to using TW5's "serve.sh" (which doesn't offer as much flexibility as directly invoking tiddlywiki
as a command).
I was thinking it could be useful to add something along these lines:
If you are already running a TW5 instance with a command like
tiddlywiki mywiki --listen host=0.0.0.0 port=8080
then you can add GSD5 as a plugin by adding the directory location of "gsd/core" after two plus signs ("++"):
tiddlywiki ++/path/to/gsd5/plugins/gsd5/core mywiki --listen host=0.0.0.0 port=8080
I see it's also possible to add plugins in a plugins
subdirectory in your wiki folder (mywiki
in the example above). This would be my preferred method, as it keeps all the plugins in one location with the wiki they're installed on, but it looks like it's a little more fiddly.
To get GSD5 to work from a directory mywiki/plugins/gsd5-core
, it seems all the JavaScript files should be in a "flat" subdirectory called "js
", and all the tiddlers in a "flat" subdirectory called "tiddlers
", with no additional subdirectories within js
and tiddlers
:
mywiki/
tiddlers/
$__StoryList.tid
# ...
plugins/
gsd5/
js/
complete.js
# ...
tiddlers/
DashboardGroup.tid
# ...
# ... other plugins ...
I therefore wrote a few lines of shell script which copy the GSD5 files into this structure, after renaming plugins/gsd5/core/images/dashboard.tid
to plugins/gsd5/core/images/dashboard-image.tid
(since
otherwise there are two files called dashboard.tid
, and one overwrites the other).
I'd be happy to add that, too, if you can give any guidelines on how it might best fit into your project.
Cheers!