38 - Links to files that are not notes
Dendron enables rich linking functionality for notes, but the same is not extended to files that are not notes. Extended capabilities for linking and referencing all files would be useful, especially when publishing or working with native workspaces.
- Dendron should allow links to any file in a workspace, not just notes.
- Dendron should allow references to embed content from any file, including text and image files.
- For easier handling of files, Dendron should allow "proxy notes" to stand in for files.
Proxy notes will be regular notes that contain a special property in their frontmatter to specify that they are a proxy for a specific file. Alternatively, this feature may integrate with the Note Type System to identify which notes are proxy notes.
Proxy notes should optionally be able to specify the type of file they link to.
Dendron could identify the file types automatically if they are not provided.
These types will be MIME types.
For text files, Dendron could use the subtype to identify if the file is a code
Range based references
Dendron should add support for linking to specific regions of text files. We can use line numbers or block anchors to achieve this.
Scanning all files to find anchors in them would be difficult and error prone, since there may be lots of files within the workspace. We should probably only scan some files (only linked files or only files that have a proxy), or otherwise rely on dynamically scanning the file for anchors when "Goto Note" is used.
If possible, Dendron should recognize the "Rename File" action inside VSCode and automatically refactor the url field to follow the new name. Dendron should also provide a refactor action when the url field is selected which moves or renames the file while also updating the url.
- A link to a file
- Reference (embed) a region from a text file
- Reference an image
- Reference a file using a proxy note
Proxy file contents:
Proxy notes allow powerful actions, but could cause unnecessary complexity. We should weigh the features against the added complexity in terms of usage, discoverability, and maintainability.