How do I update my custom theme?
-
I have a custom theme uploaded to github, and installed and active on my forum.
On the plugins list it says "Installed 1.0.0 | Latest 1.0.0"
I updated the version number in package.json on github, why does nodebb still say the latest is 1.0.0? Where is it getting the number from? How do I tell nodebb there's been an update (hopefully without just reinstalling it via command line)
-
NodeBB gets the versions from npm, not from GitHub. You need to publish your new version and then NodeBB should see the latest version within a day or so.
-
Does that mean my theme would be listed in everyone elses plugin list? It's a custom theme for my site, not something I want to publish
-
@jim-bridger
Why don't you simple run 'npm update <package>' in the nodebb root and restart ? -
@jim-bridger in that case you'll just need to update it manually with npm when you make changes, because NodeBB doesn't handle updates for modules outside the npm registry.
-
@jim-bridger said in How do I update my custom theme?:
Does that mean my theme would be listed in everyone elses plugin list? It's a custom theme for my site, not something I want to publish
Yes, that is correct. Because you've published it to npm, our package manager automatically picks it up as an available theme and offers it for download to any other NodeBB.
You can set
nbbpm.index
tofalse
in yourpackage.json
, but this would also remove the theme from your plugins list.The easiest thing to do would be to publish the theme under your own namespace (agian, with
nbbpm.index
set tofalse
), and then install it via the command line, as @pitaj suggested.e.g.
npm i @jimbridger/nodebb-theme-mytheme