Updated graphview

pull/483/head
Zef Hemel 2023-07-24 11:27:54 +02:00
parent 1a33b213be
commit 15726d0ec8
3 changed files with 49 additions and 8 deletions

View File

@ -9,6 +9,7 @@ release.
* **Bug fix**: Renaming of pages now works again on iOS * **Bug fix**: Renaming of pages now works again on iOS
* Backlinks (as queried via the `link` data source) now contains richer data, namely `inDirective` (if the link appears in the context of a directive) and `alias` (if the backlink has an alias name). This also fixes not updating page references inside directives. This introduced a backwards incompatible data. To update your indexes, please run {[Space: Reindex]} on your clients (once). * Backlinks (as queried via the `link` data source) now contains richer data, namely `inDirective` (if the link appears in the context of a directive) and `alias` (if the backlink has an alias name). This also fixes not updating page references inside directives. This introduced a backwards incompatible data. To update your indexes, please run {[Space: Reindex]} on your clients (once).
* Added {[Debug: Reset Client]} command that flushes the local databases and caches (and service worker) for debugging purposes. * Added {[Debug: Reset Client]} command that flushes the local databases and caches (and service worker) for debugging purposes.
* Added {[Editor: Center Cursor]} command.
* New template helper `replaceRegexp`, see [[🔌 Core/Templates@vars]] * New template helper `replaceRegexp`, see [[🔌 Core/Templates@vars]]
* Big internal code refactor * Big internal code refactor

View File

@ -1,32 +1,72 @@
--- ---
type: plug type: plug
uri: github:bbroeksema/silverbullet-graphview/graphview.plug.json uri: github:silverbulletmd/silverbullet-graphview/graphview.plug.json
repo: https://github.com/bbroeksema/silverbullet-graphview repo: https://github.com/silverbulletmd/silverbullet-graphview
author: Bertjan Broeksema author: Bertjan Broeksema
--- ---
<!-- #include [[https://raw.githubusercontent.com/bbroeksema/silverbullet-graphview/main/README.md]] --> <!-- #include [[https://raw.githubusercontent.com/silverbulletmd/silverbullet-graphview/main/README.md]] -->
# SilverBullet plug for showing a graph view of the documents # SilverBullet plug for showing a graph view of the documents
This plug aims to bring functionality similar to the Obsidian Graph view to SilverBullet. This plug aims to bring similar functionality as the Obsidian Graph view to
Silver Bullet.
This repo is a fork of
[Bertjan Broeksema's original repo](https://github.com/bbroeksema/silverbullet-graphview)
## Installation ## Installation
Open (`cmd+k`) your `PLUGS` note in SilverBullet and add this plug to the list: Open (`cmd+k`) your `PLUGS` note in SilverBullet and add this plug to the list:
```yaml ```yaml
- github:bbroeksema/silverbullet-graphview/graphview.plug.json - github:silverbulletmd/silverbullet-graphview/graphview.plug.js
``` ```
Then run the `Plugs: Update` command and off you go! Then run the `Plugs: Update` command and off you go!
## Usage ## Usage
Run the `Show Graph` command to open up the graph view. Zoom and pan are supported by scroll and pinch gestures with the mouse(pad). Run the `Show Global Graph` command to open up the graph view. Zoom and pan is
supported by scroll and pinch gestures with the mouse(pad).
### Tags & Paths
Set tags on the pages to customize their appearance in the graph
- `#node_color=ff0000` → Change node color to red
- `#.graphignore` → Hide the page from the graph
You can also use other custom tags to define node colors: Create a colormap with
HEX-colorcodes in `SETTINGS.md`. In this example, a node of a page where the tag
`#garden` is set will be rendered as green:
```yaml
# Graphview
graphview:
default_color: "000000"
colormap:
path:
⚙ services: "01017a"
📓 notes: "02bdb6"
🚧 projects: "ffc533"
🧰 how-to: "96020e"
tag:
garden: "0bbd02"
```
## Links
Click on the node labels to directly navigate to pages in your space
## Label-shortening
Long labels are shortened for readability. E.g.
`notesarecool/somethingverylong/subsubsubsub/foo``notes./somet./subsu./foo`
## For offline development ## For offline development
To ease the development of the visual part, the offline folder contains a copy of the HTML and custom JavaScript, as well as a simple graph model. To ease development of the visual part, the offline folder contains a copy of
the html and custom javascript. As well as a simple graph model.
```bash ```bash
$ cd offline $ cd offline

View File

@ -32,7 +32,7 @@ These plugs are written either by third parties or distributed separately from t
* [[🔌 Ghost]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-ghost)) * [[🔌 Ghost]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-ghost))
* [[🔌 Git]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-git)) * [[🔌 Git]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-git))
* [[🔌 Github]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-github)) * [[🔌 Github]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-github))
* [[🔌 Graph View]] by **Bertjan Broeksema** ([repo](https://github.com/bbroeksema/silverbullet-graphview)) * [[🔌 Graph View]] by **Bertjan Broeksema** ([repo](https://github.com/silverbulletmd/silverbullet-graphview))
* [[🔌 KaTeX]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-katex)) * [[🔌 KaTeX]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-katex))
* [[🔌 Mattermost]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-mattermost)) * [[🔌 Mattermost]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-mattermost))
* [[🔌 Mermaid]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-mermaid)) * [[🔌 Mermaid]] by **Zef Hemel** ([repo](https://github.com/silverbulletmd/silverbullet-mermaid))