1
0

Better onboarding page

This commit is contained in:
Zef Hemel 2023-01-16 12:06:37 +01:00
parent fd8645c157
commit c8f0304ade
4 changed files with 41 additions and 2 deletions

View File

@ -63,7 +63,10 @@ export async function ensureAndLoadSettings(
} catch { } catch {
await space.writePage( await space.writePage(
settings.indexPage, settings.indexPage,
`Welcome to your new space!`, `Hello! And welcome to your brand new SilverBullet space!
<!-- #include [[💭 silverbullet.md/Getting Started]] -->
<!-- /include -->`,
); );
} }

View File

@ -39,7 +39,7 @@ export function cleanWikiLinkPlugin(editor: Editor) {
break; break;
} }
} }
if (cleanPage === "") { if (cleanPage === "" || cleanPage.startsWith("💭")) {
// Empty page name, or local @anchor use // Empty page name, or local @anchor use
pageExists = true; pageExists = true;
} }

5
website/Cloud Links.md Normal file
View File

@ -0,0 +1,5 @@
You can access the “markdown web” through SilverBullet directly. The idea of the the markdown web (we really need a better name) is simple: the Internet is a messy place — tracking everywhere, tons of banners and other stuff  lets bring it back to the basics. How about Markdown?
SilverBullet supports navigating this markdown web via cloud links, theyre simply wiki links that start with “💭 “. For instance: [[💭 silverbullet.md/Silver Bullet]]. When you click one of these links, SilverBullet will simply pull in its content and present it to you in read-only mode (and do some clever internal link rewriting). What it does is simply fetch the link via HTTPs and postfixes the url with `.md`, so [[💭 silverbullet.md/Silver Bullet]] will simply fetch [this page](https://silverbullet.md/Silver%20Bullet.md). You can access all of the SilverBullet website this way, for instance heres the [[💭 silverbullet.md/CHANGELOG]].
To publish your own content this way, simply create an `index.md` on your host (this will be fetched as the main page), and publish all the rest of your content as `.md` files along side it. Thats all theres to it.

View File

@ -0,0 +1,31 @@
## Getting started
The best way to get a good feel for what SilverBullet is like to use, is to get your hands dirty (after washing your hands first, always wash your hands before touching a keyboard).
Here are some things for you to try _right now_:
* Click on the page picker (book icon) icon at the top right, or hit `Cmd-k` (Mac) or `Ctrl-k` (Linux and Windows) to open the **page switcher**.
* Type the name of a non-existent page to create it.
* You can pages in folders (if youre into that type of thing) simply by putting slashes (`/`) in the name (even on Windows), e.g. [[My Folder/My Page]] (note that although you only see the last bit of the name in live preview, the page is in fact nested in a folder).
* Click on the terminal button (top right) or hit `Cmd-/` (Mac) or `Ctrl-/` (Linux and Windows) to open the **command palette** (note that not all commands will work in this mode). On mobile you can tap the screen with 3 fingers at the same time to open the command palette.
* Select some text and hit `Alt-m` to ==highlight== it, or `Cmd-b` (Mac) or `Ctrl-b` (Windows/Linux) to make it **bold**, or `Cmd-i` (Mac) or `Ctrl-i` (Windows/Linux) to make it _italic_.
* Click a link somewhere on this page to navigate there. When you link to a [[New Page]] it will initially show up in red (to indicate it does not yet exist), but once you click it — you will create the page automatically (only for real when you actually enter some text).
* Start typing `[[` somewhere to insert a page link (with completion).
* [ ] Tap this box 👈 to mark this task as done.
* Start typing `:party` to trigger the emoji picker 🎉
* Type `/` somewhere in the text to invoke a **slash command**.
* Hit `Cmd-p` (Mac) or `Ctrl-p` (Windows, Linux) to show a preview for the current page on the side.
* Click this button {[Editor: Toggle Vim Mode]} to toggle Vim mode
Note that as you move your cursor around on this page and you get close to or “inside” marked up text, you will get to see the underlying [[💭 silverbullet.md/Markdown|Markdown]] code, this is what we refer to as “live preview” — generally your text looks clean, but you still can see whats under the covers. To move your cursor somewhere by mouse without navigating or activating (e.g. a wiki, regular link, or a button) hold `Alt` when you click.
Hadnt we mentioned [[💭 silverbullet.md/Markdown|Markdown]] yet? Yeah, thats the markup language youll use to markup your documents. Its pretty simple to learn if you dont know it already.
You will notice this whole page block is wrapped in a [[💭 silverbullet.md/%F0%9F%94%8C_Directive|Directive]] (in this case `#include`), which means that its content is automatically updated every time you run the {[Directives: Update]} command or navigate back to the page. In the case of `#include` this means the body will be replaced with the page included, so dont be surprised when whatever you update inside of this directive block will be undone later. Just sayin. [[💭 silverbullet.md/%F0%9F%94%8C_Directive|Directives]] are a powerful feature, so you should definitely look into them once you get comfortable with the basics.
Feel free to completely remove all content on this page and make it your own, its just to get you started.
## What next?
Generally, you can find more information about SilverBullet on its official website. You have two ways to access it:
1. Through its [regular website link](https://silverbullet.md/)
2. Directly, through your local SilverBullet instance using [[💭 silverbullet.md/Cloud Links]]: [[💭 silverbullet.md/Silver Bullet]] (note that all of these will be read-only, for obvious reasons)