@pitaj
Thank you so much.
Write, please, what happens if you make a nested construction.
There is a file index.tpl and header.tpl.
Inside index.tpl I am writing a directive
<!-- IMPORT header.tpl -->
and this design does not work.
Is there any system,
which would print warnings if the directive can not be interpreted?
Rahmon
Posts
-
Benchpress template syntax -
Benchpress template syntaxI want to write only 1 file
---> tpltohtml.js, but I do not have enough knowledge. I'm programming in C ++.
tpltohtml.js should generate in
my htmls directory
two files categories.html and topic.html that are converted from categories.tpl, categories.json, topic.tpl, topic.json
I want to understand how to modify
categories.tpl and topic.tpl. For this, I want to simplify everything as much as possible and discard all that is superfluous - leaving only bootstrap.js
help me please finish
file tpltohtml.js Then I'll be with him
conduct experiments and this will help me understand how to modify the forum pages -
Benchpress template syntax@pitaj
Hello.
I installed the benchpressjs package.
In the tests directory, I created the htmls directory. Please help me finish / fix the file tpltohtml.js. The task of this file should be written to the htmls directory
two categories.html and topic.html files that are converted from categories.tpl, categories.json, topic.tpl, topic.json
Begin
tpltohtml.js:'use strict';
const fs = require('fs');
const path = require('path');const { prepare, equalsIgnoreWhitespace } = require('./lib/utils');
const Benchpress = require('../build/lib/benchpress');
const mainData = require('./categories.json');const htmlDir = path.join(__dirname, 'htmls');
function htmlWFile({ output, err }) {
fs.writeFileSync(path.join(htmlDir,${name}.html
), `${output == null ? `PRECOMPILE FAILED: ${err}` : output} `);
}
-
How to start working with Benchpress?@julian said in How to start working with Benchpress?:
Benchpress
Please write how to use the template rendering engine NodeBB with Benchpress
Very much I ask the brief instruction.
I want to look at topic.tpl and category.tpl from the topic nodebb-theme-rocket-master or any other topic -
How to start working with Benchpress?I have a theme nodebb-theme-rocket-master
She does not work
Write me please what algorithm of error search.
How would you look for errors and what tools did you use? -
How to start working with Benchpress?@pitaj
I'm trying to execute 3 commands:- npm i benchpressjs
- npm install
- npm test
The third command produces an error, which I described.
-
How to start working with Benchpress?@rahmon
C:\woprk\atb\node_modules\benchpressjs>npm test[email protected] pretest C:\woprk\atb\node_modules\benchpressjs
grunt babel && eslint --cache .Running "babel:dist" (babel) task
Done.
Oops! Something went wrong!
ESLint: 4.18.1.
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:eslint --init
ESLint looked for configuration files in C:\woprk\atb\node_modules\benchpressjs\build and its ancestors. If it found none, it then looked in your home directory.
If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint
npm ERR! Test failed. See above for more details.
How to fix this error?
-
How to start working with Benchpress?I'm new to these technologies. Please write how you can use Benchpress. Make
Please give us a brief overview. Is there a way to see the topic nodebb-theme-rocket-master with Benchpress and understand why it does not work now? Can I use Benchpress for analysis, debugging, and modification
nodebb-theme-rocket-master?
How to do it? -
How to start working with Benchpress?I do not have the theme nodebb-theme-rocket-master.
On the forum, I read that there is a Benchpress tool.
Can I use Benchpress to view the .tpl files from the theme
nodebb-theme-rocket-master
Is there a quick start for
Benchpress? Can someone advise how to get started and what to see with Benchpress? -
Internal Server Error@pitaj said in Internal Server Error:
./nodebb reset -t
./nodebb reset -t
./nodebb reset -aDoes not work.
What to do?2018-02-20T10:56:03.925Z [14936] - info: Routes added
2018-02-20T10:56:03.929Z [14936] - info: NodeBB Ready
2018-02-20T10:56:03.933Z [14936] - info: Enabling 'trust proxy'
2018-02-20T10:56:03.938Z [14936] - info: NodeBB is now listening on: 0.0.0.0:4567
2018-02-20T10:57:30.386Z [14936] - error: /categories
Error: Failed to lookup view "categories" in views directory "/opt/nodebb/build/public/templates"
at Function.render (/opt/nodebb/node_modules/express/lib/application.js:580:17)
at ServerResponse.render (/opt/nodebb/node_modules/express/lib/response.js:1008:7)
at content (/opt/nodebb/src/middleware/render.js:83:15)
at /opt/nodebb/node_modules/async/dist/async.js:3866:24
at replenish (/opt/nodebb/node_modules/async/dist/async.js:998:17)
at /opt/nodebb/node_modules/async/dist/async.js:1002:9
at eachOfLimit (/opt/nodebb/node_modules/async/dist/async.js:1027:24)
at /opt/nodebb/node_modules/async/dist/async.js:1032:16
at eachOf (/opt/nodebb/node_modules/async/dist/async.js:1103:5)
at _parallel (/opt/nodebb/node_modules/async/dist/async.js:3865:5)
at Object.parallelLimit [as parallel] (/opt/nodebb/node_modules/async/dist/async.js:3948:5)
at async.waterfall.str (/opt/nodebb/src/middleware/render.js:78:12)
at nextTask (/opt/nodebb/node_modules/async/dist/async.js:5310:14)
at next (/opt/nodebb/node_modules/async/dist/async.js:5317:9)
at /opt/nodebb/node_modules/async/dist/async.js:958:16
at /opt/nodebb/node_modules/async/dist/async.js:473:16
Missing translation "language:dir"
Missing translation "pages:home"
Missing translation "language:dir"
Error: Failed to lookup view "footer" in views directory "/opt/nodebb/build/public/templates"
at Function.render (/opt/nodebb/node_modules/express/lib/application.js:580:17)
at /opt/nodebb/src/middleware/header.js:255:13
at nextTask (/opt/nodebb/node_modules/async/dist/async.js:5310:14)
at next (/opt/nodebb/node_modules/async/dist/async.js:5317:9)
at /opt/nodebb/node_modules/async/dist/async.js:958:16
at /opt/nodebb/src/middleware/header.js:243:6
at /opt/nodebb/node_modules/async/dist/async.js:3874:9
at /opt/nodebb/node_modules/async/dist/async.js:473:16
at replenish (/opt/nodebb/node_modules/async/dist/async.js:993:25)
at iterateeCallback (/opt/nodebb/node_modules/async/dist/async.js:983:17)
at /opt/nodebb/node_modules/async/dist/async.js:958:16
at /opt/nodebb/node_modules/async/dist/async.js:3871:13
at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:107:11)
at Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:88:5)
at /opt/nodebb/node_modules/async/dist/async.js:66:19
at /opt/nodebb/node_modules/async/dist/async.js:3866:24 -
Internal Server ErrorI changed the theme "npm install nodebb-theme-rocket"
After that, the forum stopped working. A bug is displayed in the browser
"Internal Server Error".Which file should I edit to return the forum to its original state?
Are there debugging methods for theme? How to understand where the error in this theme is? -
Looks like your connection to NodeBB was lostAt me now all earned.
I did not understand what happened.
My config.json line
"url": "http: // http://88.215.238.215:4567" -
Looks like your connection to NodeBB was lostIt surprises me that
a lot of people ask this question and no one explains the meaning
this error. Why you can not contact technical support
and find out why they are flashing this message? Why it is impossible to make the displayed error messages more informative?
I got this message out and what do I do?
What was the point of showing it?
I entered only such lines in the file
/etc/nginx/nginx.conflocation / {
proxy_pass http://127.0.0.1:4567;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $ remote_addr;
proxy_set_header Host $ host;
proxy_set_header Upgrade $ http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_cache_bypass $ http_upgrade;
} -
Looks like your connection to NodeBB was lostLooks like your connection to NodeBB was lost, please wait while we try to reconnect.
If you go to the control panel and change the settings, they are not remembered after you press the button with the floppy disk. In the browser console with a period of 1 second, the message socket.io.js appears: 2 GET http://88.215.238.215/socket.io/?EIO=3&transport=polling&t=M6anMWL 403 (Forbidden)
How to fix it?