What plugins do you have? Try disabling all plugins.
Where does NodeBB compile templates?
-
In that case,
public/templates
-
@julian and it's safe to rm -rf public/templates/* ?
-
Should be*. The files there get regenereated every time you restart (or reload, I'd assume) NodeBB.
* Caveat Emptor
-
Yup. And it isn't tjs that does this, its NodeBB. We'll be moving stuff like this into grunt eventually
-
@psychobunny I prefer Gulp myself.
-
Gulp is cool too, but right now we have some decent amount of technical debt having built LESS compilation and JS minification into NodeBB itself as opposed to using Grunt / Gulp etc. So stay tuned to https://github.com/NodeBB/NodeBB/issues/3543 we'll be trying to cut down on this towards 1.0
-
What does that code actually do?
I'm trying to figure this out because I'm working on a template system myself. To me, comparing compiled templates to uncompiled ones, it looks like this compilation doesn't really do much at all. Wouldn't a better compilation system compile templates into executable functions?
-
Templates can be located in lots of places...
src/views
for ACP, the theme itself for everything else, plugins can also introduce templates..compile()
just collects them all and puts them (or links them) inpublic/templates
-
@julian that's way simpler than I thought the compilation was doing, although the code makes sense now (comments help with that, too
)
@psychobunny should really get working on compiling templates into JavaScript functions. It would probably speed up your rendering fairly significantly.
String#replace is actually a very slow operation compared to concatenation.
-
Yeah its on my todo for tjs 1.0