1
0
silverbullet/docs/Mounts.md

32 lines
1.0 KiB
Markdown
Raw Normal View History

2022-07-06 10:17:04 +00:00
Space mounting in `MOUNTS`
```yaml
- path: file:/Users/zef/git/blog
2022-07-06 15:48:43 +00:00
prefix: blog/
2022-07-06 10:17:04 +00:00
perm: ro,rw #default rw
2022-07-06 15:48:43 +00:00
- path: http://someIP:3000
prefix: prod/
2022-07-06 10:17:04 +00:00
```
Features
* Auto translates internal wiki links (prefixes with prefix) and removes prefix upon save
To do:
* [ ] Handle queries
* `page` and `link` query needs to dynamically add/remove a `and name =~ /^🚪 PREFIX/` clause)
* `task` same but with `page` check
2022-07-06 15:48:43 +00:00
* [x] Add `file:` support
* [x] Add `http:`/`https:` support
2022-07-06 10:17:04 +00:00
* Due to namespacing, the mounted space needs to be namespaced somehow
* Could be an emoji, could be a page prefix (now using `name`)
* On the fly link rewriting on read and write with prefix
* Will require an actual set of `fs` syscalls:
* readFile(path)
* writeFile(path, text)
* listFiles(path) with stat-like results (at least enough for `PageMeta` responses)
* If this exists, should not all disk file access work through plugs as well and have that abstraction happen at this level?
protocols:
* file:
* http/https with “password” field for authentication