如何更改节点红色页面标题 [英] How to change node-red page title
问题描述
如何更改节点红色页面标题?
How can I change node-red page title?
我在 node-red 的 github 页面上看到了一个关于此的问题.但我不明白我需要更改哪个文件.
I have seen an issue on node-red's github page about this. But I could not understand which file I need to make changes.
哪些文件需要更改?我需要安装一个节点来编辑主题吗?
Which file do need to change? Do I need to install a node for editing theme?
推荐答案
来自您链接到的文档:
当作为独立应用程序运行时,这些属性是从 settings.js 文件中读取的.这个文件的位置是按顺序确定的:
When run as a standalone application, these properties are read from the settings.js file. The location of this file is determined in the order:
- 使用 --settings|-s 命令行参数进行设置
- 在用户目录中,如果它是由 --userDir|-u 命令行参数指定的
- 在默认用户目录:$HOME/.node-red/settings.js
- 在 node-red 安装目录中
当您运行 node-red 时,它会记录它正在使用的确切设置文件的路径,例如:
When you run node-red it logs the path to the exact settings file it is using, for example:
5 Feb 14:59:12 - [info] Settings file : /Users/nol/.node-red/settings.js
在该文件中,您将看到启动块内的默认设置:
Within that file you'll see the default set of settings within a block that starts:
module.exports = {
}
您需要在该块中添加 editorTheme
属性 - 请记住将其保留为有效的 javascript 语句,因此您需要在此和之前的设置.
You need to add the editorTheme
property within that block - remember to keep it a valid javascript statement, so you'll need a comma (,
) between this and the previous setting.
例如:
module.exports = {
... all your existing settings ...
editorTheme: {
page: {
title: "My own Node-RED title"
}
}
}
编辑完文件后,重新启动 Node-RED 以获取更改.
Once you've edited the file, restart Node-RED to pickup the changes.
这篇关于如何更改节点红色页面标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!