Editor Themes relative path

Hello Everyone, i am creating a customized UI for my istance of node red and looking up at the Editor themes documentation portion :

page: {
        title: "Node-RED",
        favicon: "/absolute/path/to/theme/icon",
        css: "/absolute/path/to/custom/css/file",
        scripts: [ "/absolute/path/to/custom/script/file", "/another/script/file"]
    },
    header: {
        title: "Node-RED",
        image: "/absolute/path/to/header/image", // or null to remove image
        url: "http://nodered.org" // optional url to make the header text/image a link to this url
    },
    deployButton: {
        type:"simple",
        label:"Save",
        icon: "/absolute/path/to/deploy/button/image" // or null to remove image
    },

in order to pass the favicon or the images it requires the absolute file path, is it possible to have it relative, if yes, how? i tried __dirname but i couldn't do it. i tried with examples like .\..\ style and something like that but it failed. I am on Windows.

Thank you for the help, have a nice day

Probably i explained myhself pretty poorly, i'd like not to use the absolute path in order to reference the css, is there a way? If yes, where should i put the folder that comntains the icons,images, and the css file?

Hello @alevher !

Did you sort it out? I'm facing the same issue. I tried the absolute path like :favicon: "C:\Users\jowagen\Downloads\favicon.ico" and didn't work.

@hugo-maciel

try with "C:/Users/jowagen/Downloads/favicon.ico"

Hello !

I used this favicon: __dirname + "\\style\\icons\\favicon.ico"

dirname is the directory where the settings js file is, i have in the .nodered folder a subdirecotry style with everytihng in it

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.