Skip to content

Commit e98b27c

Browse files
committed
Content improvements
1 parent dd25ee6 commit e98b27c

File tree

9 files changed

+60
-52
lines changed

9 files changed

+60
-52
lines changed

Library/Std/Template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ end
4040
-- * The extracted frontmatter
4141
function template.fromPage(name, raw)
4242
local fm = index.extractFrontmatter(space.readPage(name), {
43-
removeFrontmatterSection = true,
43+
removeFrontMatterSection = true,
4444
removeTags = true
4545
})
4646

website/API/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ It returns a table with two keys:
5656
The `extractOptions` is an optional table that can contain the following keys (which will affect the returned `text`):
5757
- `removeKeys`: An array of keys to remove from the frontmatter.
5858
- `removeTags`: A boolean or array of tags to remove from the frontmatter.
59-
- `removeFrontmatterSection`: A boolean to remove the frontmatter section from the document.
59+
- `removeFrontMatterSection`: A boolean to remove the frontmatter section from the document.
6060

6161
Example applied to this page:
6262
${(index.extractFrontmatter(editor.getText())).frontmatter}

website/Commands.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ Commands define actions that SilverBullet can perform. They range from simple ed
33
SilverBullet ships with a lot of commands built in, but custom ones can also be defined using [[Space Lua]] and [[Plugs]].
44

55
Beside the list below, all commands available commands appear in the [[Command Palette]] but may have key bindings as well (these key bindings appear in the [[Command Palette]] and are configurable in [[^Library/Std/Config]]).
6+
7+
You can create custom command using the [[^Library/Std/Command]] API.

website/Linked Mentions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
On this site you see a section “Linked Mentions” appear along the bottom of every page that has incoming links. 👇🏻 This section lists all pages that contain a _link_ to the current page. This allows for easy navigation, and may help you discover linked concepts through these links.
1+
On this site you see a section “Linked Mentions” appear along the bottom of every page that has incoming links. 👇🏻 This section lists all pages that contain a _link to_ the current page. This allows for easy navigation, and may help you discover linked concepts through these links.
22

3-
Implementation: [[^Library/Std/Widgets#Table of contents]]
3+
Implementation: [[^Library/Std/Widgets#Linked mentions]]

website/Objects.md

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SilverBullet automatically builds and maintains an index of _objects_ extracted from all markdown pages in your space. It subsequently allows you to use [[Space Lua/Lua Integrated Query]] to query this database in (potentially) useful ways.
1+
SilverBullet automatically builds and maintains an index of _objects_ extracted from all [[Markdown]] [[Pages]] in your [[Spaces]]. It subsequently allows you to use [[Space Lua/Lua Integrated Query]] to query this database in (potentially) useful ways.
22

33
By design, the truth remains in the markdown: all data indexed as objects will have a representation in markdown text as well. This index can be flushed at any time and be rebuilt from its source markdown files kept in your space (and you can do so on demand if you like using the `Space: Reindex` command).
44

@@ -7,49 +7,19 @@ Every object has a set of [[Attributes]], some predefined, but you can add any a
77

88
The following attributes are predefined, and you can expect all objects to have them:
99
* `ref`: a globally unique _identifier_, often represented as a pointer to the place (page, position) in your space where the object is defined. For instance, a _page_ object will use the page name as its `ref` attribute, and a `task` will use `page@pos` (where `pos` is the location the task appears in `page`).
10-
* `tag`: the main type, or “tag” of the page, usually a built-in type of the object (see below).
10+
* `tag`: the main type, or “tag” of the object, usually a built-in type (see below for a list).
1111

1212
In addition, many objects will also contain:
1313
* `tags`: an optional set of additional, explicitly assigned tags.
14-
* `itags`: a set of _implicit_ or _inherited_ tags: including the object’s `tag`, `tags` as well as any tags _assigned to its containing page_. This is useful to answer queries like, “give me all tasks on pages where that page is tagged with `person`“, which would be expressed as `task where itags = "person"` (although technically that would also match any tags that have the `#person` explicitly assigned).
14+
* `itags`: a set of _implicit_ or _inherited_ tags: including the object’s `tag`, `tags` as well as any tags _assigned to its containing page_. This is useful to answer queries like, “give me all tasks on pages where that page is tagged with `person`“, which would be expressed as `query[[from index.tag "task" where table.includes(_.itags, "person")]]` (although technically that would also match any tags that have the `#person` explicitly assigned).
1515

1616
Beside these, any number of additional tag-specific and custom [[Attributes]] can be defined (see below).
1717

1818
# Tags
1919
Every object has a main `tag`, which signifies the type of object being described. In addition, any number of additional tags can be assigned as well via the `tags` attribute. You can use either the main `tag` or any of the `tags` as query sources in [[Space Lua/Lua Integrated Query]] — examples below.
2020

21-
## Styling
22-
You can add custom styles to a tag by leveraging the `data-tag-name` attribute, [CSS Attribute Selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) and custom [[Space Style]]'s. Every tag gets an attribute added to it called `data-tag-name` that is set to the tag name with the `#` symbol stripped out. So given the tag #my-cool-tag the `data-tag-name` attribute would look like:
23-
24-
data-tag-name="my-cool-tag"
25-
26-
This allows us to do things like change the color of the #my-cool-tag
27-
to have a purple background, limegreen text and bold font by adding the following [[Space Style]]:
28-
29-
```css
30-
.sb-hashtag[data-tag-name="my-cool-tag"] {
31-
background: purple;
32-
color: limegreen;
33-
font-weight: bolder;
34-
}
35-
```
36-
37-
Additionally tags written using angle brackets, such as...
38-
39-
#<my cool tag>
40-
41-
...can be styled via [[Space Style]] like this:
42-
```css
43-
.sb-hashtag[data-tag-name="my cool tag"] {
44-
background: purple;
45-
color: limegreen;
46-
font-weight: bolder;
47-
}
48-
```
49-
50-
## Built-in tags
51-
52-
### page
21+
# Built-in tags
22+
## page
5323
Every page in your space is available via the `page` tag. You can attach _additional_ tags to a page, by either specifying them in the `tags` attribute [[Frontmatter]], or by putting additional [[Tags]] in a stand alone paragraph with no other (textual) content in them, for instance check the very first line of this page that says `#level/intermediate`.
5424

5525
In addition to `ref` and `tags`, the `page` tag defines a bunch of additional attributes as can be seen in this example query:
@@ -59,12 +29,12 @@ ${query[[from index.tag "page" where name == _CTX.currentPage.name]]}
5929
Note that you can also query this page using the `level/intermediate` directly:
6030
${query[[from index.tag "level/intermediate"]]}
6131

62-
### aspiring-page
32+
## aspiring-page
6333
[[Aspiring Pages]] are pages that are linked to, but not yet created.
6434

6535
${query[[from index.tag "aspiring-page"]]}
6636

67-
### table
37+
## table
6838
Markdown table rows are indexed using the `table` tag, any additional tags can be added using [[Tags]] in any of its cells.
6939

7040
| Title | Description Text |
@@ -77,7 +47,7 @@ ${query[[from index.tag "table" where page == _CTX.currentPage.name]]}
7747

7848
Table headers will be normalized by converting them to lowercase and replacing all non alphanumeric characters with `_`.
7949

80-
### item
50+
## item
8151
List items (both bullet point and numbered items) are indexed with the `item` tag, and additional tags can be added using [[Tags]].
8252

8353
Here is an example of a #quote item using a custom [[Attributes|attribute]]:
@@ -121,7 +91,7 @@ ${template.each(query[[from index.tag "upnext"]], templates.taskItem)}
12191

12292
Similar to [[#item]], `task` objects have a `parent` attribute when nested (pointing to their parent `item`), and inherit their ancestor’s tags in `itags`.
12393

124-
### taskstate
94+
## taskstate
12595
[[Tasks]] support the default `x` and ` ` states (done and not done), but custom states as well. Custom states used across your space are kept in `taskstate`:
12696

12797
* [NOT STARTED] Task 1
@@ -148,25 +118,24 @@ age: 55
148118
Which then becomes queriable via the `contact` tag:
149119
${query[[from index.tag "contact"]]}
150120

151-
### link
121+
## link
152122
All page _links_ are tagged with `link`. You cannot attach additional tags to links. The main two attributes of a link are:
153123

154124
* `toPage` the page the link is linking _to_
155125
* `page` the page the link appears on
156126

157127
In addition, the `snippet` attribute attempts to capture a little bit of context on where the link appears.
158128

159-
_Note_: this is the data source used for the {[Mentions: Toggle]} feature as well page {[Page: Rename]}.
160-
161129
Here is a query that shows some links that appear in this particular page:
130+
162131
${query[[from index.tag "link" where page == _CTX.currentPage.name limit 5]]}
163132

164-
### header
133+
## header
165134
Headers (lines starting with `#`, `##` etc.) are indexed as well and queriable.
166135

167136
${query[[from index.tag "header" where page == _CTX.currentPage.name limit 3]]}
168137

169-
### tag
138+
## tag
170139
The ultimate meta tag is _tag_ itself, which indexes for all tags used, in which page they appear and what their “parent tag” is (the context of the tag: either `page`, `item` or `task`).
171140

172141
Here are the tags used/defined in this page:

website/Outlines.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#level/intermediate
2-
3-
While SilverBullet is not a “proper” outliner, it does offer a number of useful commands to manage outlines.
1+
While SilverBullet is not a “proper” outliner like e.g. [LogSeq](https://logseq.com), it does offer a useful commands to manage outlines.
42

53
An outline is simply a (nested) bulleted list, for instance:
64

website/Self Hosting.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
According to [Wikipedia](https://en.wikipedia.org/wiki/Self-hosting_(web_services)):
2+
3+
> **Self-hosting** is the practice of running and maintaining a [website](https://en.wikipedia.org/wiki/Website) or [service](https://en.wikipedia.org/wiki/Service_\(systems_architecture\) "Service (systems architecture)") using a private [web server](https://en.wikipedia.org/wiki/Web_server "Web server"), instead of using a service outside of the administrator's own control. Self-hosting allows users to have more control over their data, privacy, and computing infrastructure, as well as potentially saving costs and improving skills.
4+
5+
SilverBullet is the ultimate gateway to practice hosting your own stuff.
6+
7+
Had a taste and want more? Here are some excellent resources:
8+
9+
* [Self hosting Reddit](https://www.reddit.com/r/selfhosted/)
10+
* [Awesome Self Hosted](https://github.com/awesome-selfhosted/awesome-selfhosted)
11+

website/Space Style.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,35 @@ The following [[Space Lua/Lua Integrated Query]] is used to determine the order
2222
query[[from index.tag "space-style" order by _.priority desc]]
2323
```
2424

25-
# Examples
25+
# Tag Styling
26+
You can add custom styles to a tag by leveraging the `data-tag-name` attribute, [CSS Attribute Selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) and custom [[Space Style]]'s. Every tag gets an attribute added to it called `data-tag-name` that is set to the tag name with the `#` symbol stripped out. So given the tag #my-cool-tag the `data-tag-name` attribute would look like:
27+
28+
data-tag-name="my-cool-tag"
29+
30+
This allows us to do things like change the color of the #my-cool-tag
31+
to have a purple background, limegreen text and bold font by adding the following [[Space Style]]:
32+
33+
```css
34+
.sb-hashtag[data-tag-name="my-cool-tag"] {
35+
background: purple;
36+
color: limegreen;
37+
font-weight: bolder;
38+
}
39+
```
40+
41+
Additionally tags written using angle brackets, such as...
42+
43+
#<my cool tag>
44+
45+
...can be styled via [[Space Style]] like this:
46+
```css
47+
.sb-hashtag[data-tag-name="my cool tag"] {
48+
background: purple;
49+
color: limegreen;
50+
font-weight: bolder;
51+
}
52+
```
53+
# More examples
2654
All the actual CSS in these examples is commented out as to not affect this very website.
2755
```space-style
2856
html {

website/pwa-screenshot.png

609 KB
Loading

0 commit comments

Comments
 (0)