Doc tweaks (#456)
parent
5ad9543926
commit
2f710baf94
|
@ -2,11 +2,11 @@ The server API is relatively small. The client primarily communicates with the s
|
|||
|
||||
Here’s an attempt to document this API:
|
||||
|
||||
* `GET /index.json` (when sent with an `Accept: application/json` request header): will return a full listing of all files in your space including meta data like when the file was last modified, as well as permissions. This is primarily for sync purposes with the client. A request sent without the mentioned `Accept` header will redirect to `/` (to better support authentication layers like [Authelia](https://www.authelia.com/)).
|
||||
* `GET /index.json` (when sent with an `Accept: application/json` request header): will return a full listing of all files in your space including metadata like when the file was last modified, as well as permissions. This is primarily for sync purposes with the client. A request sent without the mentioned `Accept` header will redirect to `/` (to better support authentication layers like [Authelia](https://www.authelia.com/)).
|
||||
* `GET /*.*`: _Reads_ and returns the content of the file at the given path. This means that if you `GET /index.md` you will receive the content of your `index` page. The `GET` response will have a few additional SB-specific headers:
|
||||
* `X-Last-Modified` as a UNIX timestamp in ms (as coming from `Data.now()`)
|
||||
* `X-Permission`: either `rw` or `ro` which will change whether the editor opens in read-only or regular mode.
|
||||
* `PUT /*.*`: The same as `GET` except that it takes the body of the request and _writes_ it a file.
|
||||
* `PUT /*.*`: The same as `GET` except that it takes the body of the request and _writes_ it to a file.
|
||||
* `DELETE /*.*`: Again the same, except this will _delete_ the given file.
|
||||
* `GET /.client/*`: Retrieve files implementing the client
|
||||
* `GET /*` and `GET /`: Anything else (any path without a file extension) will serve the SilverBullet UI HTML.
|
||||
|
|
|
@ -4,15 +4,15 @@ You’ve been told there is _no such thing_ as a [silver bullet](https://en.wiki
|
|||
|
||||
Before we get to the nitty gritty, some _quick links_ for the impatient reader: [[Install]], [[CHANGELOG]], [Roadmap](https://github.com/orgs/silverbulletmd/projects/2/views/1), [Issues](https://github.com/silverbulletmd/silverbullet/issues), [Discussions](https://github.com/silverbulletmd/silverbullet/discussions), [Mastodon](https://hachyderm.io/@silverbullet), [Discord](https://discord.gg/EvXbFucTxn), [Docker Hub](https://hub.docker.com/r/zefhemel/silverbullet).
|
||||
|
||||
Now that we got that out of the way, let’s have a look at some of SilverBullet’s features.
|
||||
Now that we got that out of the way let’s have a look at some of SilverBullet’s features.
|
||||
|
||||
## Features
|
||||
* Runs in any modern browser (including on mobile) as an **offline-first [[PWA]],** keeping the primary copy of your content in the browser, syncing back to the server when a network connection is available.
|
||||
* Provides an enjoyable [[Markdown]] writing experience with a clean UI, rendering text using [[Live Preview|live preview]] further **reducing visual noise**, while still providing direct access to the underlying markdown syntax.
|
||||
* Provides an enjoyable [[Markdown]] writing experience with a clean UI, rendering text using [[Live Preview|live preview]], further **reducing visual noise** while still providing direct access to the underlying markdown syntax.
|
||||
* Supports wiki-style **page linking** using the `[[page link]]` syntax, even keeping links up-to-date when pages are renamed.
|
||||
* Optimized for **keyboard-based operation**:
|
||||
* Quickly navigate between pages using the **page switcher** (triggered with `Cmd-k` on Mac or `Ctrl-k` on Linux and Windows).
|
||||
* Run commands via their keyboard shortcuts, or the **command palette** (triggered with `Cmd-/` or `Ctrl-/` on Linux and Windows).
|
||||
* Run commands via their keyboard shortcuts or the **command palette** (triggered with `Cmd-/` or `Ctrl-/` on Linux and Windows).
|
||||
* Use [[🔌 Core/Slash Commands|slash commands]] to perform common text editing operations.
|
||||
* Provides a platform for [end-user programming](https://www.inkandswitch.com/end-user-programming/) through its support for annotating pages with [[Frontmatter]] and [[🔌 Directive|directives]] (such as [[🔌 Directive/Query|#query]]), making parts of pages _dynamic_.
|
||||
* Robust extension mechanism using [[🔌 Plugs]].
|
||||
|
@ -46,7 +46,7 @@ Don’t just sit there, try it!
|
|||
* Hit `Cmd-p` (Mac) or `Ctrl-p` (Windows, Linux) to show a live preview for the current page on the side, if your brain doesn’t speak native Markdown yet.
|
||||
* Click this button {[Editor: Toggle Vim Mode]} to toggle Vim mode
|
||||
* Open this site on your phone or tablet and... it just works!
|
||||
* Are you using a browser with **PWA support** (e.g. any Chromium-based
|
||||
* Are you using a browser with **PWA support** (e.g., any Chromium-based
|
||||
browser)? Click on that little icon to the right of your location bar that says “Install SilverBullet” to give SB its own window frame and desktop icon, like it is a stand-alone app (not particularly useful on silverbullet.md, but definitely do this once you install it yourself). Now, unplug your network cable and reload the page. It still works!
|
||||
|
||||
Oh yeah, and you can use fancy things like tables:
|
||||
|
|
|
@ -23,7 +23,7 @@ Whenever the directives are updated, the body of the directive will be replaced
|
|||
|
||||
## Use
|
||||
$use
|
||||
The `#use` directive can be used to use a referenced page as a handbars template. Optionally, a JSON object can be passed as argument to the template:
|
||||
The `#use` directive can be used to use a referenced page as a handlebars template. Optionally, a JSON object can be passed as argument to the template:
|
||||
|
||||
<!-- #use [[template/plug]] {"name": "🔌 Directive", "repo": "https://google.com", "author": "Pete"} -->
|
||||
|
||||
|
@ -37,7 +37,7 @@ which renders as follows:
|
|||
|
||||
Note that a string is also a valid JSON value:
|
||||
|
||||
So, a template can take, for instance a tag name as an argument:
|
||||
So, for instance, a template can take a tag name as an argument:
|
||||
|
||||
<!-- #use [[template/tagged-tasks]] "test" -->
|
||||
* [ ] [[🔌 Directive@1537]] This is a test task #test
|
||||
|
|
Loading…
Reference in New Issue