How to change node-red page title

前提是你 提交于 2019-12-24 09:59:25

问题


How can I change node-red page title?

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.

Here is that issue on github.

Same thing on node-red web site configuration section.

Which file do need to change? Do I need to install a node for editing theme?


回答1:


From the documentation you link to:

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:

  • set using the --settings|-s command-line argument
  • in the user directory if it was specified by the --userDir|-u command-line argument
  • in the default user directory: $HOME/.node-red/settings.js
  • in the node-red install directory

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 = {


}

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.

For example:

module.exports = {
    ... all your existing settings ...

    editorTheme: {
        page: {
            title: "My own Node-RED title"
        }
    }
}

Once you've edited the file, restart Node-RED to pickup the changes.



来源:https://stackoverflow.com/questions/48625494/how-to-change-node-red-page-title

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!