Topics, categories and users can be watching, tags can watched?
屏幕快照 2019-01-09 上午11.04.17.png
Can't start NodeBB after switching theme
So after getting and installing my theme here I'm trying to start
I can't run NodeBB, or get back in to switch my theme back.
I also can't figure out what went wrong.
Can I get a bit of help?
Alright, I figured out the error:
[themes] Could not find base template files at: /root/nodebb/node_modules/nodebb-theme-vanilla/templates
The thing is aqll the templates are there, and even when I copied the templete folder into my nodetendo theme it still said the same thing on ./nodebb log.
./nodebb reset themesThen
./nodebb startshould get your site back up.
Thank you very much, @a_5mith
My forum is working again!
However, my custom theme still breaks NodeBB. Can anyone tell me why? I'd love to become a theme dev, but I can't really do that if my themes crash the BB
@CyanPrime Check your nodebb-theme-vanilla files are exactly like this: https://github.com/NodeBB/nodebb-theme-vanilla, any changes you want to make, recreate the file in your new theme. Any file that doesn't exist in your theme will fallback to vanilla. Also make sure that you change all the package theme files etc. Use this for guidance
Sidenote from looking at your github page, if you're pulling that theme as it is there, it will be installing in nodebb/node_modules/node_modules/nodebb-theme-nodetendo. Your root folder in github should be the theme, not node_modules. Your file structure should look like nodebb/node_modules/nodebb-theme-nodetendo, the base error is because your theme.less has ../ (go back one directory) which is still within your plugin. Hope that makes sense. Having said that, if you just pulled the git from nodebb root, it should install correctly. Hmm. I'll have a play with it.
Ok, I've got your theme working, you need to take the less folder, the theme.json and the theme.less, and put them in your root folder called nodebb-theme-nodetendo (before node_modules), delete the node_modules folder from your theme by running
sudo rm -r -f node_modules(do this in your theme folder, not in nodebb, otherwise you'll only be adding to your issues.
Your theme still won't work, as you need to actually define a few things, if you run
./nodebb devyou will see an error along the lines of
brand-primary is undefined, you will need to create a variables.less file inside your less folder and define all your CSS. To start with, just copy the contents of less from vanilla and it should run fine. (Don't quote me on that, I'm not actually a theme developer.)
Image for reference, in my case nodebb has been renamed to a different folder name.
Either way, now your theme is in the correct format, go to docs.nodebb.org and look in the guide for theming.
Thank you all for your help. I got it working! It was actually a error in the tutorial that I managed to figure out.
Here's a link to how I did it: https://github.com/CyanPrime/nodebb-theme-nodetendo/commit/70b4938097f083df01ec724b28c4041a0f6c7d3c
And here is the erroring tutorial: http://burnaftercompiling.com/nodebb/nodebb-hands-on-theming-guide-part-1/
Once again, thank you all.
@CyanPrime not sure how that's fixed it as your route inside theme.less doesn't actually point to the vanilla template. For that file to point at vanilla, you'd be looking at ../../../nodebb-theme-vanilla, but if it works then, so be it.