Create custom Luci theme


I'm looking for a comfortable method for creating a custom Luci theme.
My method:

  1. Fork Luci
  2. Change Luci's rep link at my ImageBuilder
  3. Make some changes at me fork & push them
  4. Update ImageBuilder's Luci
  5. Compile image

But I'd like to check all changes straight on live machine, but I don't know how, because all Luci files locate at the /rom (I guess Read-Only Memory) directory, so there is no way to rewrite them.

1 Like

I think all the LuCI themes live in /www/luci-static/, where you can edit the files live and refresh your browser to see the effects. I just changed some colors in /www/luci-static/openwrt2020/cascade.css and it showed up immediately for me...

Some .css files are there, but .html footer & header are at the /rom.
And I need to change .css's and .html's

If you edit files in the RAM partition, for example, /usr/share/ucode/luci/template/admin_status/index.ut, it will create a copy in the flash /overlay partition that supersedes the original in /rom, so just edit the "installed" files and off you go...

You can see this by finding specific files before and after edits, diffing various pairs:

$ find / -name index.ut

Oh, it works.
Thanks a lot man!

1 Like

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