Plugin Static Directories
-
Tagging @mr_waffle, @frissdiegurke
Pursuant to your suggestions pertaining toward my earlier refactor of the static directory system (henceforth referred to as "staticDirs"), please be advised that the system has been refactored to take your suggestions into account.
Please also be advised that this is no longer compatible with any adjustments to the earlier revision of the staticDirs system, as the relative path expected has changed. As the earlier revision was not published in a NodeBB version, it will not be supported. Plugins using the older "single static directory" system are still backwards compatible until v0.5 as discussed prior.
Please address all complaints to our complaint division at
/dev/null
. Thank you.
tl;dr?
staticDirs
is an object, its keys are a false path mapping that you define:staticDirs: { "waffle-iron": "./static-stuff" }
means you'll be able to refer to stuff on the client side by accessing/plugins/nodebb-plugin-yourPluginId/waffle-iron/{somefilename}
- Theoretically, the key can contain slashes. This is untested. Let me know if it doesn't work
- On the client-side, you'll have to use the plugin ID in the url as well now.
/plugins/nodebb-plugin-yourPluginId/{static-mapping}/{somefilename}
- If your old plugins use
staticDir
, they'll continue to work staticDir: "./assets"
is functionally equivalent to:staticDirs: { "": "./assets" }
-
nice work
will rework some things on my plugins/themes for 0.4.x in a few days when I'll have some spare time ^^
echo 'just spamming your complaint-system' > /dev/null
Theoretically, the key can contain slashes. This is untested. Let me know if it doesn't work
If you haven’t tested it, it doesn’t work
Definitely need to test this ^^ -
@frissdiegurke, I think you have to change line 1 of
01.variables.coffee
to:emojiPath = nconf.get('url') + '/plugins/nodebb-plugin-emoji-extended/emoji-extended-images'
But I'm not entirely sure, and can't test because I don't know how to compile coffeescript
-
ya, currently doing so... some other lines too
it seems like there is the bug of 404 if URI encoded path again...
-
@frissdiegurke said:
it seems like there is the bug of 404 if URI encoded path again...
Actually, I noticed that as well... so won't be working right away
@planner -- just a temporary setback while @frissdiegurke updates his plugin. I've dropped back to regular emoji for now. Will switch back over when he commits
-
Will switch back over when he commits
done with emoji-extended
-
I have emoji-extended installed on mine, too, but the emoticons are not this size.
-
damn, overlooked the 'css' attribute within plugin.json^^ wait a sec.
-