custom page template's javascript in wrong place?
-
I created a new theme (from persona) with a new
testpage.tpl
.
After a nodebb build, I get this message in devtools:GET https://mydomain.com/assets/src/client/testpage.js?v=6a0hef49d1f 404 (Not Found)
And in fact, no
testpage.js
exists at that (nginx) location. There is one inbuild/public/templates/testpage.js
however. But it's in the wrong place for the server to find it for the browser's request.Is this how it's supposed to be? How can this be fixed?
Thanks any helpful feedback.
-
Take a look at https://github.com/NodeBB/nodebb-plugin-quickstart/commit/d7eeafaf242eeb448af047ef4d2bfc87075887e7.
The quickstart plugin now has a sample for creating a new page along with the clientside javascript that's loaded when the user navigates to that page.
When you create a new page/template nodebb automatically tries to load a requirejs module for that page from
assets/src/client/<templateName>.js
The error you see is because you are missing the js file.