Understanding "Installing custom plugins on Node.js"

237 views
Skip to first unread message

Kevin Kleinfelter

unread,
May 27, 2020, 9:50:42 AM5/27/20
to TiddlyWiki
I'm trying to apply the info from "Installing custom plugins on Node.js" at tiddlywiki.com, and I'm not "getting it."  I need some help with understanding the details.  I have a single npm-installed tiddlywiki server with 3 wikis.

I see 3 methods described: environment variables, plugins folder in the wiki folder, node_modules/tiddlywiki/plugins.  I'm not interested in the 3rd of those due to the npm warning in the doc.  For the sake of discussion, let's assume I have two custom plugins I want to install, cleverly named plugin1 and plugin2, and I've downloaded and unpacked them both into folders in my home directory, with the plugin.info files ~/testing/plugin1/plugin.info and ~/testing/plugin2/plugin.info.

environment variables:
  • Using this method would make a plugin available to all my wikis, right?
  • Would I set "TIDDLYWIKI_PLUGIN_PATH=~/testing" or would I set "TIDDLYWIKI_PLUGIN_PATH=~/testing/plugin1:~/testing/plugin2"?
  • I would still need to edit the tiddlywiki.info file in the root folder of each of my 3 wikis, in order to actually load these plugins, right?

plugins folder in the wiki folder:
  • Using this method would make a plugin only available to that one wiki, not impacting my other wikis served by the same node.js, right?
  • If one of my wiki folders is named /data/wiki1, then would I need to move ~/testing/plugin1 to /data/wiki/plugins/plugin1?
  • I don't see any mention of editing tiddlywiki.info for this method. Was that an omission from the doc, or does TW automatically load all plugins from this plugins folder?
Anything I missed?


Flibbles

unread,
May 27, 2020, 11:53:47 AM5/27/20
to TiddlyWiki
For the second method, your project directory will have stuff laid out like this:

```
tiddlers/{all my tiddlers}
plugins/pluginName/plugin.info
plugins/pluginName/(other plugin stuff}
```

If you have your project set up like this, then your tiddlywiki server will have "pluginName" as a plugin. No need to edit the tiddlywiki.info file.

I hope this helps? If not, let me know.
Reply all
Reply to author
Forward
0 new messages