README
nodebb-custom-theme
Installation
Please, follow the default instuction for the theme - https://docs.nodebb.org/development/themes/
The name of the theme is "nodebb-theme-project-x"
npm install nodebb-theme-project-x
There are also needed action from administration section to set appropriate icons:
- activate theme in the admin interface (/admin/appearance/themes)
- forum name and logo (/admin/settings/general)
- set favicon (/admin/settings/general)
- icons for categories (/admin/manage/categories/1)
- subcategories (/admin/manage/categories)
- switch on search plugin (forum upgrade process is needed)
- header menu items (right now the default ones are used) - /admin/general/navigation
- turn off RSS icons near category title (/admin/settings/web-crawler)
Local development
To locally develop the theme you need the full nodebb installation (with mongo db or without)
To change theme name you need to change the theme name in the following files:
- package.json
- theme.json
- less/common.less and other less files (the theme name is used as image path part )
To change the theme source file and see changes in on the local forum instance it is possible to use npm link mechanism.
Deployment
It is only way to deploy theme to server - is using the standard mechanism:
npm install nodebb-theme-project-x
The method with npm link will break ./nodebb upgrage
script because it uses npm install --production
inside which doesnt support the npm link
The simple copy file to directory node_modules/nodebb-theme-custom-theme
is also is not working in case of npm upgrade
Forum Administration
Changing name/ logo
SETTINGS > GENERAL
Change Site Title
In the "Site Logo" section "Image field" choose "UPLOAD".
Change Language:
General(Общие) > Languages (Языки)> Русский
Adding a category
To add a category click "+" icon at the bottom left of the screen
To add children-categories
To add new sub-category click on the '+' sign in Manage (Управление) > Categories (Категории)
.
Then add title of sub-category in Category Name
field.
Then in the (Optional) Parent Category
field define the category where you want your subcategory to show up in the form of rounded thumbnail.
Change category icons
Manage (Управление) > Categories (Категории) > Edit (Редактировать)
In the "Edit" tab choose UPLOAD IMAGE
in the right side. You can find all necessary icons in static/icons
folder;
Set the following rules at the left side of page:
Background Colour' -
#d7d7d7`Background Image Size
-cover
To turn off "RSS" icon and functionality
SETTINGS (Настройки) > Web Crawler (Индексация)
And switch Disable RSS Feeds to the active mode;
How to turn on "search"
Go to EXTEND > Plugins
Find nodebb-plugin-dbsearch
and install or activate it.
After installation you probably need to upgrade
your nodebb.
Subcategories The colored bullets
What are the colored bullets under almost each "Category"
The answer is here: https://www.sportbikes.ws/;
These are the "subcategories" (children-topics)
Troubleshooting
reset theme
Sometimes during theme development you need to change the theme name. It can break a lot of things so it needs to reset theme to default one
./nodebb reset -t
upgrade (from one forum version to another)
./nodebb upgrade
Under the hood, upgrade is making npm install --production
so it is not possible to use npm link to install the theme