Custom theme being removed when installing new modules
-
Hello,
Apologies if this has already been answered somewhere, but I've started working on a custom theme for my forum, I copied the base files from the vanilla theme and placed them into the node_modules folder, which allowed me to select my theme and edit etc...
But if I install a new module, it removes my folder and I have to re-upload it.
Is there a way I can 'install' or 'register' my custom local theme without needing to upload it or make it public somewhere?
Thanks in advance.
-
@Brophy What I do with my custom plugin is
git clone nodebb-plugin-my-plugin
into the server user's home folder,
cd nodebb-plugin-my-plugin
npm link
then in the nodebb's root folder:
npm link nodebb-plugin-my-plugin
. And I never lose the plugin, if I have to release a new update I just do agit pull
in the plugin (original) folder, then is updated automatically when I restart the forum.So in your case I'd say create the
nodebb-theme-your-theme
folder somewhere in your server, donpm link
and then in nodebbnpm link nodebb-theme-your-theme
.But I think this is suggested for development environments, not for production, even if in my case is working pretty well
Another way to do it is to install your theme withnpm install git+https://[email protected]/<your-git-user>/<your-private-theme-repo>.git