Migration from single HTML file to Node.js

What is the easiest way to migrate content from single HTML to Node.js? Thank you!

1 Like

here is a command to take the tiddlers and put them into a folder. tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder

Start up a new nodejs TW : tiddlywiki mynewwiki --init server , from here.

move tiddlers from mywikifolder to tiddlers folder in Nodejs wiki directory.

Alternatively you could start up the nodejs server and drag and drop the single file to it then choose which tiddlers to import!

1 Like

It would be great to have a Videocast on this process. It seems to be easy, but none fhe less I always had a feeling of having missed something.
So I stick to the single file version for years though node definitely has advantages.
Can I still Drag and Drop Plugins to a node.js=implementation?

Depend but for official plugins the doc recommend to edit the tiddlywiki.info file like this :

..
    "plugins": [
        "tiddlywiki/tiddlyweb",
        "tiddlywiki/filesystem",
        "tiddlywiki/highlight"
    ],
..

See https://tiddlywiki.com/#Installing%20custom%20plugins%20on%20Node.js

2 Likes

@JanJo I would just add that on node and bob etc… Implementations you can add plugins to the server or the independant wikis. For example a one off plugin it may be easier to install it in one wiki and all you favorites in the server.

How many wikis you expect to build in that node instance over time may also influence you choice.

At least in bob you can always export a site to a single file wiki even without the command line.

It would be a great, if someone could make a video on installation of custom plug ins in node js. I guess drag and drop also works. But I have never succeeded in installing plug ins as told in the TW documentation. May be this can be inspiration for @pmario next YouTube video.

2 Likes

@JanJo Yes, but they are part of the “content”, so they will be stored in the /tiddlers/directory.

1 Like

It’s not really possible to create a video, that matches the docs. I have had a closer look to the docs and it needs to be re-structured.

The different elements are correct but there is some duplicated info, which has subtle differences. So it’s confusing for new users.

  • There are probably 3 ways to install plugins to single-file wikis
  • There are at least 3 more ways use plugins in a node-js environment

The node and single-file plugin handling needs to be clearly separated. At the moment the info is mixed. That’s why you probably had trouble to do it right.

I’ll try to create a PR with a new structure this weekend using: 7 Steps to Improve the TiddlyWiki Documentation

5 Likes

I ask myself whether there is a difference which plugins should be installed with paths in node.js and which plugins can be installed as

For example I noticed that the uglify-plugin can make specific use of such an installation (the changes than are reversible) Is this the case with other plugins as well? It would be great to have an overview here.

Another question I have regarding node.js is how compatible it is with php files.
For example I have some files which allow users to upload files and store them in directories in the same folder as my single wiki index.html.
Would such a contruction be still possible?

There is a pending PR at Github … Once it is merged, it will be possible to record some videos, that show how to deal with the different plugin installation methods.

You can import this JSON file to tiddlywiki.com and start with the Plugin tiddler and the changes made recently shown in the Recent tab. … The problem is, that working with plugins and a client-server configuration needs some more explanation.

PR-restructuring-plugin-install.json (23.6 KB)

2 Likes

Sure, but for plugin you have to have a defined directory strucute, that is described in the PluginFolders tiddler. For eg: Image files it depends on the server settings, if it’s possible to serve them

1 Like

I would love to know what you are doing here and how you do it.

Hi @TW_Tones here this is off-topic but we can continue this thread.

Here you have it :wink:

Discussion about Node.js plugins and environment variables start at video 11. If you start with 12 you’ll miss important stuff.

I recommend to start at video 1 … I think it’s worth it :wink:

1 Like

Thank you @pmario. I saw your videos from the beginning (5 to 12) and it was very informative. It’s good that you kept each concept as short videos rather than a single lengthy video. Even though I knew the basic things of using node js wiki, it’s was interesting to see how an experienced user cum developer is using node js wiki - learned some new tips from those videos. Installation of plug ins was the most wanted part of this video series and you did it nicely and precisely. I didn’t get time to test what I learned from your videos which I will do shortly and come back with my doubts. Link to this video series could be added to the official documentation about the node js wiki I guess. There are more in interesting videos in your YouTube channel, some of which I have seen in the past. Thanks for all your contributions to the tiddlywiki project.

I had commented in one of your video (my YouTube profile name has an extra n than the one used in this forum)

In short: you can install plugins in exactly the same way in node.js as in a single file tiddlywiki - I cannot see any downside to this - and it is EASY.

I do not see the point in installing plugins as directories if the plugin does not add functionality the the node.js instance. - I have written many plugins - they are released as ‘packaged plugins’ - ie. as a plugin tiddler. It is possible to run these plugins from directories but you would need to know how to check their repositories out of github and then branch the resulting repositories to the correct version.

Different plugins may need different paths - on widows I have never gotten this to work with more than one path.