Question: How to add own assets (e.g. images necessary for a theme)?
Moved
Solved
Technical Support
-
Hi nodebb-community,
I'm building my first custom theme. For that theme I need to request an image.
Now of course there is the possibility to upload into the public folder and hard-reference it there,
but I am curious if there is a way that I can add it into my theme-folder, like into "images", and then use it inside my theme.Is there a way to accomplish this?
-
So after researching a little more I found my answer inside the plugin.json of the quickstart-plugin.
"staticDirs": { "images": "./images" },
Adding a staticDirs key inside the plugin.json like that adds the static dirs inside
/assets/plugins/your-plugin-name/
.
Copyright © 2024 NodeBB | Contributors