silverbullet/plugs/template/template.plug.yaml

55 lines
1.0 KiB
YAML
Raw Normal View History

2023-08-28 23:12:15 +08:00
name: template
functions:
# API
renderTemplate:
path: api.ts:renderTemplate
cleanTemplate:
path: api.ts:cleanTemplate
# Indexing
indexTemplate:
path: index.ts:indexTemplate
events:
2023-12-22 01:37:50 +08:00
# Special event only triggered for template pages
- page:indexTemplate
2023-11-06 16:14:16 +08:00
2023-12-22 01:37:50 +08:00
# Completion
2023-11-06 16:14:16 +08:00
templateSlashCommand:
path: snippet.ts:snippetSlashComplete
2023-11-06 16:14:16 +08:00
events:
- slash:complete
insertSnippetTemplate:
path: snippet.ts:insertSnippetTemplate
2023-12-22 01:37:50 +08:00
handlebarHelperComplete:
path: var.ts:templateVariableComplete
2023-12-22 01:37:50 +08:00
events:
- editor:complete
2023-11-06 16:14:16 +08:00
# Widget
templateWidget: # Legacy
path: template_block.ts:widget
codeWidget: template
renderMode: markdown
2023-12-22 01:37:50 +08:00
# API invoked when a new page is created
newPage:
path: page.ts:newPage
2023-08-28 23:12:15 +08:00
# Commands
2023-12-22 01:37:50 +08:00
newPageCommand:
path: page.ts:newPageCommand
2023-08-28 23:12:15 +08:00
command:
2023-12-22 01:37:50 +08:00
name: "Page: From Template"
key: "Alt-Shift-t"
requireMode: rw
2023-12-22 01:37:50 +08:00
# Lint
lintTemplateFrontmatter:
path: lint.ts:lintTemplateFrontmatter
events:
- editor:lint