logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
30.07k stars 1.76k forks source link

custom.css, config.edn, etc. do not function when they belong to read-only filesystems #11267

Open sylvi-3 opened 3 weeks ago

sylvi-3 commented 3 weeks ago

Search first

What Happened?

When the custom.css file (located at /logseqdirectory/graphdirectory/logseq/custom.css) is a symbolic link to a file in a read-only filesystem, the contents will appear in the in-app 'edit custom.css' page, but will not have any effect. The same seems to be the case with the config.edn file within the same directory.

Reproduce the Bug

  1. Create a custom.css file in a read only filesystem, then create a symbolic link in /logseqdirectory/graphdirectory/logseq/custom.css 1a. In my case this means declaring the custom.css file with home-manager.
  2. Launch the logseq application. Enter Settings > Edit custom.css
  3. The text of your linked file should be visible, since it is named correctly and in the right place, but the CSS will never update.

Expected Behavior

custom.css declared using home-manager, or any otherwise valid .css file that is linked from a RO directory, should be read and applied properly by logseq.

Desktop or Mobile Platform Information

NixOS 24.05 Using nixpkgs unstable, home-manager, and nix-flakes Logseq version 0.10.8

Additional Context

I have found a workaround for this issue, which involves declaring the custom.css and config.edn in a nearby directory, then setting home-manager's home.file."filename".onChange setting to a script that copies the file from the directory it's created in to the /logseq directory of my graph.

Are you willing to submit a PR? If you know how to fix the bug.