Link rendering doesn't differentiate existing vs non existing files
See original GitHub issueWhat happened?
When I render a file link to a file that doesn’t exist, the link shows up the same as when the file does exist.
When I create links without using dataview, then links to files that don’t exist are rendered in a lighter color. The following screenshot demonstrates the difference:
Test case
Here is a sample text (note that PageA exists, but PageB does not):
[[PageA]] exists but [[PageB]] doesn't exist
```dataviewjs
dv.span(
`${dv.fileLink("PageA")} exists but ${dv.fileLink("PageB")} doesn't exist`
);
```
DQL
No response
JS
dv.span(
`${dv.fileLink("PageA")} exists but ${dv.fileLink("PageB")} doesn't exist`
);
Dataview Version
0.5.41
Obsidian Version
0.15.9
OS
MacOS
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Client-side vs. server-side rendering: why it's not all black and ...
Server-side rendering is the most common method for displaying information onto the screen. It works by converting HTML files in the server into ......
Read more >Render partial from different folder (not shared) - Stack Overflow
In my case I was using MvcMailer (https://github.com/smsohan/MvcMailer) and wanted to access a partial view from another folder, that wasn't in "Shared.
Read more >Rendering on the Web
There is a longstanding debate over the correct applications of server rendering versus client-side rendering, but it's important to remember ...
Read more >Basics of rendering and exporting in After Effects CC
Learn how to render and export in After Effects using the Render Queue panel and Media Encoder and what are the supported output...
Read more >Copy files in Linux, avoid the copy if files do exist in destination
Just use cp -n <source> <dest> . From man page: -n, --no-clobber. do NOT overwrite an existing file (overrides a previous -i option)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, parity with Obsidian’s behavior would be great. I’m auto-generating links, and it’s important to know if the link target exists or not.
I’m happy to try a workaround if you have suggestions.
As far as I know, there isn’t much I can do about this in the general case of “render text with links in it”, since all Dataview is doing is calling the obsidian markdown API (
MarkdownRenderer.renderMarkdown
), which is actually responsible for rendering links. I.e., this is an issue with the obsidian API and not dataview in particular (you may see this behavior in similar plugins which render markdown).I can special case the rendering of standalone links in tables to explicitly do the check and add the appropriate CSS, though that is about it.