If you want to manage 3rd party plugin libraries on your own you can use the following description.
It assumes that you have the following
Prerequisites:
- Preferable installed a Node.js LTS version. At the time of writing it is: LTS 22.19.0
-
GIT, used to clone the latest plugin versions from GitHub
Set OS Environment Variables
TW can use environment variables eg: TIDDLYWIKI_PLUGIN_PATH and others to search for plugins, themes and editions.
So you can use that environment variable to point to your central directory, where you keep your external plugins.
For example if the TIDDLYWIKI_PLUGIN_PATH contains c:\my\plugin-hub\
. At wiki startup the core will search for plugins there, depending on the tiddlywiki.info plugin settings. Eg:
tiddlywiki.info
may contain the resizer-plugin like this:
{
"plugins": [
"tiddlywiki/codemirror",
"BTC/resizer"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"languages": [
]
}
We ususally use a <author-name>/<plugin-name>
pattern, since this allows us to avoid plugin name clashes. Those author-name/plugin-name settings also represent a directory structure.
So if your
- TIDDLYWIKI_PLUGIN_PATH is:
c:\my\pluginhub
and
- tiddlywiki.info
BTC/resizer
The full directory path where TW searches at startup is c:\my\plugin-hub\BTC\resizer
if you are on windows.
As you can see, this directory structure makes it possible to have 3rd party plugins from several authors in the same directory, where the environment variable points to.
Important:
- In tiddlywiki.info we always use forward slashes as directory separators. The core takes care of this depending on the OS where it runs on.
- The environment variables have to use the OS convention. So backslashes for Windows and forward slashes for Unix systems.
- TiddlyWiki uses forward slashes and adjusts according to the OS.
So how do you get the resizer plugin into c\my\plugin-hub\BTC\resizer
?
The github repository is at: GitHub - BurningTreeC/resizer: Resize your TiddlyWiki5. From there you can clone it using git.
We need to create the following directory structure - Step by step
cd c:\my\pluign-hub
mkdir BTC
cd BTC
git clone https://github.com/BurningTreeC/resizer.git
cd resizer
git checkout v0.5.0
This method will allow you to work with the current resizer version. Even if BTC publishes a new version you can maintain it as you like.
I hope that helps.
-Mario