Custom theme being removed when installing new modules

Technical Support
  • GNU/Linux Gamers


    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.

  • #2

    @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 a git 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, do npm link and then in nodebb npm 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 with npm install git+https://[email protected]/<your-git-user>/<your-private-theme-repo>.git

  • GNU/Linux Gamers

    Thank you very much! @Giggiux

Suggested Topics

| | | |