custom.css, config.edn, etc. do not function when they belong to read-only filesystems
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 45k
- Forks
- 2.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 105
Description
### Search first
- [X] I searched and no similar issues were found
### 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.
- [ ] I'm willing to submit a PR (Thank you!)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Logseq application loads `logseq/custom.css` and `logseq/config.edn`, especially when those paths are symbolic links into a read-only filesystem. Reproduce the NixOS 24.05 setup and verify that linked `custom.css` is applied and linked `config.edn` is honored without copying either file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, css
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100