[Guide] Override the home page on a NodeBB
-
Hmm, interesting. Nice tutorial @julian !
-
I don't suppose the ACP will ever have a "select homepage" option
I imagine it would be possible to do. It's something I've been wanting to do but haven't had the time for it yet
-
@sadmulwar The guide is for an outdated version of NodeBB, you should just try assigning the
/
route against the router... @baris or @psychobunny can confirm, but in your listener forstatic:app.load
:plugin.init = function(data, callback) { data.router.get('/', function(req, res) { // ... }); callback(); });
-
I appears the custom homepage plugin doesn't work well with ajaxify. If you ajaxify to the
/
route, it just goes to the categories page. However, if you cold load to/
, it goes to the custom homepage. Is there a way to fix this?Is there a hook to add possible routes to the "Home Page Route" dropdown in the ACP?
-
I haven't updated that plugin yet iirc, and we haven't built a hook for the ACP dropdown just yet, but its a good idea. PR?
-
You must code in your sleep, because the hook is definitely there already