Templates 2.0 (#636)

Templates 2.0 and a whole bunch of other refactoring
This commit is contained in:
Zef Hemel
2024-01-20 19:16:07 +01:00
committed by GitHub
parent 0a6a0016a2
commit f30b1d3418
171 changed files with 2038 additions and 1628 deletions
+36
View File
@@ -0,0 +1,36 @@
We would like to keep our space clean, these are some tools that help you do that.
# Broken links
This shows all internal links that are broken.
```template
query: |
link where toPage and pageExists(toPage) = false
template: |
{{#if .}}
{{#each .}}
* [[{{ref}}]]: broken link to [[{{toPage}}]]
{{/each}}
{{else}}
No broken links, all good!
{{/if}}
```
# Conflict copies
These are pages that have conflicted copies (as a result of sync), have a look at them as well as their original (non-conflicted versions) and decide which one to keep.
```template
query: |
page where name =~ /\.conflicted\.\d+$/
select
name as conflictedName,
replace(name, /\.conflicted\.\d+$/, "") as cleanName
template: |
{{#if .}}
{{#each .}}
* [[{{cleanName}}]]: confict copy [[{{conflictedName}}]]
{{/each}}
{{else}}
No conflicting pages!
{{/if}}
```