Templates 2.0 (#636)
Templates 2.0 and a whole bunch of other refactoring
This commit is contained in:
@@ -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"
|
||||
---
|
||||
---
|
||||
|^|
|
||||
---
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
tags: template
|
||||
description: Make this a level 1 heading
|
||||
hooks.snippet:
|
||||
slashCommand: h1
|
||||
match: "^#*\\s*"
|
||||
---
|
||||
#
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
tags: template
|
||||
description: Make this a level 2 heading
|
||||
hooks.snippet:
|
||||
slashCommand: h2
|
||||
match: "^#*\\s*"
|
||||
---
|
||||
##
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
tags: template
|
||||
description: Make this a level 3 heading
|
||||
hooks.snippet:
|
||||
slashCommand: h3
|
||||
match: "^#*\\s*"
|
||||
---
|
||||
###
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
tags: template
|
||||
description: Make this a level 4 heading
|
||||
hooks.snippet:
|
||||
slashCommand: h4
|
||||
match: "^#*\\s*"
|
||||
---
|
||||
####
|
||||
@@ -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
|
||||
> |^|
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
description: Insert a live query
|
||||
tags: template
|
||||
hooks.snippet.slashCommand: query
|
||||
---
|
||||
```query
|
||||
|^|
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
tags: template
|
||||
description: Insert a table
|
||||
hooks.snippet.slashCommand: table
|
||||
---
|
||||
| Header A | Header B |
|
||||
|----------|----------|
|
||||
| Cell A|^| | Cell B |
|
||||
@@ -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* [ ]
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
description: Insert an inline template
|
||||
tags: template
|
||||
hooks.snippet.slashCommand: "template"
|
||||
---
|
||||
```template
|
||||
page: "[[|^|]]"
|
||||
```
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
tags: template
|
||||
description: "Today's date"
|
||||
hooks.snippet.slashCommand: today
|
||||
---
|
||||
{{today}}
|
||||
@@ -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
|
||||
> |^|
|
||||
Reference in New Issue
Block a user