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
+8
View File
@@ -0,0 +1,8 @@
---
description: Insert a fenced code block
tags: template
hooks.snippet.slashCommand: code
---
```|^|
```
@@ -0,0 +1,11 @@
---
tags: template
description: Insert Frontmatter
hooks.snippet:
slashCommand: frontmatter
insertAt: page-start
command: "Insert Frontmatter"
---
---
|^|
---
+8
View File
@@ -0,0 +1,8 @@
---
tags: template
description: Make this a level 1 heading
hooks.snippet:
slashCommand: h1
match: "^#*\\s*"
---
#
+8
View File
@@ -0,0 +1,8 @@
---
tags: template
description: Make this a level 2 heading
hooks.snippet:
slashCommand: h2
match: "^#*\\s*"
---
##
+8
View File
@@ -0,0 +1,8 @@
---
tags: template
description: Make this a level 3 heading
hooks.snippet:
slashCommand: h3
match: "^#*\\s*"
---
###
+8
View File
@@ -0,0 +1,8 @@
---
tags: template
description: Make this a level 4 heading
hooks.snippet:
slashCommand: h4
match: "^#*\\s*"
---
####
+6
View File
@@ -0,0 +1,6 @@
---
tags: template
description: Insert a horizontal rule
hooks.snippet.slashCommand: hr
---
---
@@ -0,0 +1,7 @@
---
tags: template
description: Insert a "note" admonition
hooks.snippet.slashCommand: note-admonition
---
> **note** Note
> |^|
+8
View File
@@ -0,0 +1,8 @@
---
description: Insert a live query
tags: template
hooks.snippet.slashCommand: query
---
```query
|^|
```
+8
View File
@@ -0,0 +1,8 @@
---
tags: template
description: Insert a table
hooks.snippet.slashCommand: table
---
| Header A | Header B |
|----------|----------|
| Cell A|^| | Cell B |
+10
View File
@@ -0,0 +1,10 @@
---
tags: template
description: Turn the current line into a task
hooks.snippet:
slashCommand: task
matchRegex: "^(\\s*)[\\-\\*]?\\s*(\\[[ xX]\\])?\\s*"
command: "Turn into task"
key: "Ctrl-q t"
---
$1* [ ]
+8
View File
@@ -0,0 +1,8 @@
---
description: Insert an inline template
tags: template
hooks.snippet.slashCommand: "template"
---
```template
page: "[[|^|]]"
```
+6
View File
@@ -0,0 +1,6 @@
---
tags: template
description: "Today's date"
hooks.snippet.slashCommand: today
---
{{today}}
+6
View File
@@ -0,0 +1,6 @@
---
tags: template
description: "Tomorrow's date"
hooks.snippet.slashCommand: tomorrow
---
{{tomorrow}}
@@ -0,0 +1,7 @@
---
description: Insert a "warning" admonition
tags: template
hooks.snippet.slashCommand: warning-admonition
---
> **warning** Warning
> |^|