From 50651dc185779f49d05691f8241da2a16e5e1e0a Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Fri, 26 May 2023 16:37:32 +0200 Subject: [PATCH] Fixes #408: adding about and getting started command --- plugs/core/core.plug.yaml | 10 ++++++++++ plugs/core/help.ts | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 plugs/core/help.ts diff --git a/plugs/core/core.plug.yaml b/plugs/core/core.plug.yaml index 683fb76..2f104f5 100644 --- a/plugs/core/core.plug.yaml +++ b/plugs/core/core.plug.yaml @@ -327,6 +327,16 @@ functions: command: name: "Debug: Parse Document" + versionCommand: + path: ./help.ts:versionCommand + command: + name: "Help: Version" + + gettingStartedCommand: + path: ./help.ts:gettingStartedCommand + command: + name: "Help: Getting Started" + # Link unfurl infrastructure unfurlLink: path: ./link.ts:unfurlCommand diff --git a/plugs/core/help.ts b/plugs/core/help.ts new file mode 100644 index 0000000..d2ae12d --- /dev/null +++ b/plugs/core/help.ts @@ -0,0 +1,12 @@ +import { editor } from "$sb/silverbullet-syscall/mod.ts"; +import { version } from "../../version.ts"; + +export async function versionCommand() { + await editor.flashNotification( + `You are currently running SilverBullet ${version}`, + ); +} + +export async function gettingStartedCommand() { + await editor.openUrl("https://silverbullet.md/Getting%20Started"); +}