Skip to content

Commit 6ac5406

Browse files
committed
vault: Add 'Access links.md' for experimenting with links
1 parent 9c55aaa commit 6ac5406

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
TQ_short_mode: true
3+
TQ_extra_instructions: |-
4+
group by folder
5+
group by function task.file.filenameWithoutExtension
6+
---
7+
8+
# Accessing Links
9+
10+
> [!Warning]
11+
>
12+
> - The queries in this file are **experimental**, and **may not continue to work**.
13+
> - For example, once the Obsidian Bases facility is finalised, we *may* update the vocabulary used here to match that of Obsidian.
14+
15+
## Filtering
16+
17+
### `task.outlinks`: Task lines containing an outgoing link
18+
19+
```tasks
20+
# Task line has a link
21+
filter by function task.outlinks.length > 0
22+
limit groups 1
23+
```
24+
25+
### `task.file.outlinksInProperties`: Tasks in files whose properties/frontmatter contains a link
26+
27+
```tasks
28+
filter by function task.file.outlinksInProperties.length > 0
29+
limit groups 1
30+
```
31+
32+
### `task.file.outlinksInBody`: Tasks in files whose markdown body contains a link
33+
34+
```tasks
35+
filter by function task.file.outlinksInBody.length > 0
36+
limit groups 1
37+
```
38+
39+
### `task.file.outlinks`: Tasks in files whose file contains a link anywhere
40+
41+
```tasks
42+
filter by function task.file.outlinks.length > 0
43+
limit groups 1
44+
```
45+
46+
## Grouping
47+
48+
### Group by task outlinks
49+
50+
```tasks
51+
# Task line has a link
52+
filter by function task.outlinks.length > 0
53+
group by function task.outlinks.map(link => link.originalMarkdown).sort().join(' · ')
54+
limit groups 1
55+
```
56+
57+
### Group by task outlinks - task outlinks that give broken group headings
58+
59+
- Hovering over these links **in the task lines** works because of [#3357](https://github.com/obsidian-tasks-group/obsidian-tasks/pull/3357).
60+
- Hovering over these links **in the group headings** gives things like **Unable to find “Basic Internal Links” in Access links**
61+
62+
```tasks
63+
# Task line has a link
64+
filter by function task.outlinks.length > 0
65+
66+
# Task's link goes to a heading in the same file
67+
description includes [[#
68+
69+
filename includes internal_heading_links
70+
71+
group by function task.outlinks.map(link => link.originalMarkdown).sort().join(' · ')
72+
limit groups 1
73+
```

0 commit comments

Comments
 (0)