After some more code digging and experiments I can answer my own question. A theme is a normal plugin and as such does not inherit any behavior from other plugins.
So you need to copy everything you need from the base theme library.js to your child theme. And of course, you need to declare client scripts explicitly.
Loading of missing templates from base theme is the only link between the base and the child theme.
Max 0
Posts
-
Parent theme hooks in child theme -
How do I update my custom theme?@jim-bridger
Why don't you simple run 'npm update <package>' in the nodebb root and restart ? -
nodebb setup config/scripted admin setup failing (ansible)@pitaj Maybe I do not get the main point but IMHO (by looking at the code) you can't simply provide a ready-made config.json because it is a "result" of the install. The --setup <content> provides the answers to the questions the installer would ask but aside from gathering this info, the installer would create the DB schema (and update it if necessary), create default user, push default content.
-
nodebb setup config/scripted admin setup failing (ansible)@bejan
The setup json that you can provide with --setup=<content> has a different format than config.json, have a look at the github actions scripts in the main nodebb repo. -
Parent theme hooks in child themeHi,
I want to customize the Persona theme a little bit and started by looking at nodebb-theme-quickstart. It is clear how to replace one or more templates but I am wondering about the hooks defined in the parent theme. Should I copy all of them in my child theme if I want to keep all functionality of the parent them ? Or the parent theme is loaded anyway and the hooks code is loaded also and I can skip copying them in my child theme ?The theme-quickstart seems to suggest I can redefine only a single hook so seem the rest are supposed be be called from the parent theme. But at the same time, the scripts array in plugin.json defines references to parent theme scripts so seems those scripts are not loaded automatically.