Skip to content

Commit

Permalink
Wiki-style links (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
srid authored Aug 21, 2020
1 parent 6becbfe commit c51117d
Show file tree
Hide file tree
Showing 26 changed files with 164 additions and 145 deletions.
2 changes: 1 addition & 1 deletion guide/2011401.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Zettelkasten is a smart note taking system created by a German sociologist, whose productivity increased to epic proportions due to it[^dclear].

All notes in a Zettelkasten are linear, <2012101>, with links created between them, enabling a <2011407> to evolve organically, rather than having to preconceive a hierarchy ahead (as is the case with outliners like Workflowy and Dynalist).
All notes in a Zettelkasten are linear, [[[2012101]]], with links created between them, enabling a [[[2011407]]] to evolve organically, rather than having to preconceive a hierarchy ahead (as is the case with outliners like Workflowy and Dynalist).

[^dclear]: To learn more, read [Zettelkasten — How One German Scholar Was So Freakishly Productive](https://writingcooperative.com/zettelkasten-how-one-german-scholar-was-so-freakishly-productive-997e4e0ca125) by David Clear.

14 changes: 7 additions & 7 deletions guide/2011402.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Neuron includes a web interface for your notes that update automatically. This very site you are viewing is managed by neuron; and you may access its notes [here](https://github.com/srid/neuron/tree/master/guide). The "zettel" you are viewing currently is conceptually termed an "overview zettel", as it provides a portal into the other zettels.

Neuron also generates a complete index (at [z-index](z-index.html)) of *all* Zettels visualized as a <2017401?cf>.
Neuron also generates a complete index (at [z-index](z-index.html)) of *all* Zettels visualized as a [[2017401]].

- <2011403>
- <2011404>
- <2011405>
- <2011406>
- <2013501>
- <cc1f7ecf>
- [[[2011403]]]
- [[[2011404]]]
- [[[2011405]]]
- [[[2011406]]]
- [[[2013501]]]
- [[[cc1f7ecf]]]
3 changes: 1 addition & 2 deletions guide/2011403.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ specify your own as well, as long as it contains only the following characters:

## Why prefer random IDs?

Why does neuron use random alphameric IDs *by default*? Because then you are not forced to think of a suitable slug when writing a new note. A note's title may change in future, so could a slug. Generally text editors make it easier to work with this, by automatically showing the title of the linked note next to the link (see <4a6b25f1?cf>).

Why does neuron use random alphameric IDs *by default*? Because then you are not forced to think of a suitable slug when writing a new note. A note's title may change in future, so could a slug. Generally, text editors make it easier to work with this, by automatically showing the title of the linked note next to the link (see [[4a6b25f1]]).
14 changes: 7 additions & 7 deletions guide/2011404.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Zettel Markdown

Zettel files are written using Markdown[^other], per the [CommonMark](https://commonmark.org/) specification. Neuron uses [commonmark-hs](https://github.com/jgm/commonmark-hs) to parse them into the [Pandoc AST](https://pandoc.org/using-the-pandoc-api.html), as well as provides an extention on top to handle zettel links.
Zettel files are written in Markdown[^other], per the [CommonMark](https://commonmark.org/) specification. Neuron uses [commonmark-hs](https://github.com/jgm/commonmark-hs) to parse them into the [Pandoc AST](https://pandoc.org/using-the-pandoc-api.html), as well as provides an extention on top to handle zettel links.

* <2011504>
* <2011505>
* <2013702>
* <2013701>
* <2016401>
* [[[2011504]]]
* [[[2011505]]]
* [[[2013702]]]
* [[[2013701]]]
* [[[2016401]]]
* Styling elements using Semantic UI ([#176](https://github.com/srid/neuron/issues/176))

[^other]: Neuron is designed to be extended with other markup formats as well. Org-mode is currently supported (see the `formats` setting in <2011701?cf>) but is [experimental](https://github.com/srid/neuron/issues/275). Neuron recommends Markdown, which is supported everywhere including <041726b3?cf>.
[^other]: Neuron is designed to be extended with other markup formats as well. Org-mode is currently supported (see the `formats` setting in [[2011701]]) but is [experimental](https://github.com/srid/neuron/issues/275). Neuron recommends Markdown, which is supported everywhere including [[041726b3]].
10 changes: 5 additions & 5 deletions guide/2011405.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ Leave this command running in one terminal, and then use `neuron open` to direct

## Publishing to the web

See <778816d3>
See [[[778816d3]]]

## Features

* <2011701>
* <2014601>
* <67c6f7a0>
* <2011503>
* [[[2011701]]]
* [[[2014601]]]
* [[[67c6f7a0]]]
* [[[2011503]]]

10 changes: 5 additions & 5 deletions guide/2011406.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tags:

# Creating and Editing zettels

You may use any text editor with Markdown support to edit your zettel files. Neuron provides a command to create new zettel files with the suitable <2011403?cf>:
You may use any text editor with Markdown support to edit your zettel files. Neuron provides a command to create new zettel files with the suitable [[2011403]]:

```bash
neuron new "My zettel title"
Expand All @@ -18,16 +18,16 @@ This command will print the path to the file created. Use `-e` to also open the
neuron new "My zettel title" -e
```

Newly created zettels will be a cluster of its own (see <2012301>) until you connect other zettels to them (see <2011504?cf>).
Newly created zettels will be a cluster of its own (see [[[2012301]]]) until you connect other zettels to them (see [[2011504]]).

## Opening a Zettel by title

See <2013501?cf>.
See [[2013501]].

## Using a text editor

See <4a6b25f1>
See [[[4a6b25f1]]]

## Web Interface

<041726b3> provides a web interface to browse and edit your Neuron notes.
[[[041726b3]]] provides a web interface to browse and edit your Neuron notes.
2 changes: 1 addition & 1 deletion guide/2011407.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Richard Meadows at [lesswrong](https://www.lesswrong.com/posts/NfdHG6oHBJ8Qxc26s
## See also

* [Category-free notes](https://article69.art.blog/2019/12/20/how-and-why-to-create-a-zettelkasten-a-guide-in-the-vein-of-niklas-luhman/)
* <2017401>
* [[[2017401]]]
6 changes: 3 additions & 3 deletions guide/2011501.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ nix-env -if https://github.com/srid/neuron/archive/master.tar.gz

Note that this command can also *upgrade* your existing install of neuron.

For alternative mechanisms, see <2012401>.
For alternative mechanisms, see [[[2012401]]].

## Test your install

Expand Down Expand Up @@ -72,6 +72,6 @@ Available commands:

## What's next?

Proceed to the <2011502?cf>.
Proceed to the [[2011502]].

[^nix]: Nix is a general package manager that you can use to manage other software and services as well. [See here](https://github.com/srid/neuron/issues/193#issuecomment-629557917). If you do not wish to install Nix, try the <c6176636>. If you are on Linux, you may alternatively try the static bundle `neuron-linux-bundle` from [the nightly release](https://github.com/srid/neuron/releases/tag/nightly).
[^nix]: Nix is a general package manager that you can use to manage other software and services as well. [See here](https://github.com/srid/neuron/issues/193#issuecomment-629557917). If you do not wish to install Nix, try the [[[c6176636]]]. If you are on Linux, you may alternatively try the static bundle `neuron-linux-bundle` from [the nightly release](https://github.com/srid/neuron/releases/tag/nightly).
24 changes: 12 additions & 12 deletions guide/2011502.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tags:

# Tutorial

Make sure you have already installed neuron (see <2011501?cf>). Then follow this tutorial to get your own Zettelkasten up and running.
Make sure you have already installed neuron (see [[2011501]]). Then follow this tutorial to get your own Zettelkasten up and running.

## Test with an existing Zettelkasten

Expand All @@ -18,7 +18,7 @@ git clone https://github.com/srid/neuron.git
cd neuron
```

Now run the neuron <2011405?cf> on the `./guide` Zettelkasten:
Now run the neuron [[2011405]] on the `./guide` Zettelkasten:

```bash
neuron -d ./guide rib -wS
Expand All @@ -31,39 +31,39 @@ It can be accessed at [localhost:8080](http://localhost:8080). It should match w
There a few ways to do this.

1. Copy the `./guide` directory and work from there; or
1. Use the template repository in <778816d3?cf>; or
1. Use the template repository in [[778816d3]]; or
1. Create one from scratch.

For this tutorial, we choose the last option.

Neuron expects a Zettelkasten directory to be nothing more than a list of <2011404?cf> notes. By default `~/zettelkasten` will be used as your neuron directory (which you can override using the `-d` option). Create this directory first:
Neuron expects a Zettelkasten directory to be nothing more than a list of [[2011404]] notes. By default `~/zettelkasten` will be used as your neuron directory (which you can override using the `-d` option). Create this directory first:

```bash
mkdir ~/zettelkasten
```

Now create (see <2011406?cf>) your first zettel file:
Now create (see [[2011406]]) your first zettel file:

```bash
neuron new "My first zettel" -e
```

This will open your text editor[^editor] with the newly created file and its title already filled in. Enter some text, and exit the editor.
This will open your text editor[^editor] with the newly created file (neuron uses a random filename; let's assume it is `6479cd5e.md`) and its title already filled in. Enter some text, and exit the editor.

[^editor]: Your `$EDITOR` environment variable must be set pointing to the text editor for this to work.

Next, create an "overview" zettel called `index.md` --- it would be the welcoming page of our Zettelkasten web interface --- and link it (see <2011504?cf>) to your first zettel (we will assume its filename is "6479cd5e.md") in it:
Next, create an "overview" zettel called `index.md` --- it would be the welcoming page of our Zettelkasten web interface --- and link it (see [[2011504]]) to your first zettel in it:

```bash
$ cat > ~/zettelkasten/index.md
# Overview

* <6479cd5e>
* [[6479cd5e]]
^D
$
```

Your Zettelkasten directory `~/zettelkasten` should now contain two zettels--named `6479cd5e.md` and `index.md`. Now it is time to run the neuron <2011405?cf>:
Your Zettelkasten directory `~/zettelkasten` should now contain two zettels--named `6479cd5e.md` and `index.md`. Now it is time to run the neuron [[2011405]]:

```bash
neuron rib -wS
Expand All @@ -73,12 +73,12 @@ neuron rib -wS
* The `-S` option runs a HTTP server serving the generated HTML files.
* You can ignore it, and use `neuron open` instead.

Access it at [localhost:8080](http://localhost:8080) (or use `neuron open`). You should expect to see the contents of your overview zettel, which should link to the first zettel created. Clicking the tree icon in the nav bar should take you to the <2011503?cf> of your Zettelkasten.
Access it at [localhost:8080](http://localhost:8080) (or use `neuron open`). You should expect to see the contents of your overview zettel, which should link to the first zettel created. Clicking the tree icon in the nav bar should take you to the [[2011503]] of your Zettelkasten.

## Growing your Zettelkasten

Congratulations, you have created your first Zettelkasten using neuron! From this moment onwards, simply use the `new` command to create new zettels, `search` command to open existing zettels (or see <4a6b25f1?cf> for editor support). As your Zettelkasten grows over time, more value will be derived from it.
Congratulations, you have created your first Zettelkasten using neuron! From this moment onwards, simply use the `new` command to create new zettels, `search` command to open existing zettels (or see [[4a6b25f1]] for editor support). As your Zettelkasten grows over time, more value will be derived from it.

## What's next?

Read <2011402?cf> next to learn all the concepts and features in Neuron.
Read [[2011402]] next to learn all the concepts and features in Neuron.
6 changes: 3 additions & 3 deletions guide/2011503.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Graph view

A zettelkasten is a [directed graph](https://en.wikipedia.org/wiki/Directed_graph). Neuron also has the notion of <2017401>, which is a subset of this graph established by having zettels "branch off" to other zettels.
A zettelkasten is a [directed graph](https://en.wikipedia.org/wiki/Directed_graph). Neuron also has the notion of [[[2017401]]], which is a subset of this graph established by having zettels "branch off" to other zettels.

## z-index

The z-index page (at `/z-index.html`; also linked in the header) displays the zettelkasten <2017401> for all <2012301> in the zettelkasten graph.
The z-index page (at `/z-index.html`; also linked in the header) displays the zettelkasten [[[2017401]]] for all [[[2012301]]] in the zettelkasten graph.

## Uplinks and Backlinks

A backlink of a zettel is a zettel that links to it. If that link is a folgezettel link, it is called an "uplink". Each zettel has its <5e41fd32?cf> displayed at the top.
A backlink of a zettel is a zettel that links to it. If that link is a folgezettel link, it is called an "uplink". Each zettel has its [[5e41fd32]] displayed at the top.
56 changes: 23 additions & 33 deletions guide/2011504.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,43 @@
# Linking

To link to another zettel, put the <2011403?cf> inside angle brackets[^wikistyle]:
To link to another zettel, put the [[2011403]] inside `[[[..]]]` or `[[..]]`[^autolink]:

```markdown
This is a zettel file, which links to another zettel:
```
This is a zettel file, which links (branches of) to another zettel:
* <ef3dke98>
* [[[ef3dke98]]]
```

Such a link instructs neuron to automatically create a connection between the
associated zettels, which ultimately affects the <2017401?cf> of your zettel
graph. In <2011405?cf>, neuron will automatically display the title of the
linked zettel.
The 3-bracket syntax creates a special link (called a folgezettel) to the
specified zettel. When a zettel has a folgezettel relationship to another
zettel, it is said to "branch of" to the other zettel. Folgezetel relationships
define the [[2017401]] of your zettel graph.

In [[2011405]], neuron will automatically display the title of the
linked zettel.

## Non-branching links

If your link is merely a reference to another zettel, and you do not wish it to
be part of the <2017401?cf> and the linked zettel's <5e41fd32?cf>, use the
`cf`[^cf] query flag (eg: `<ef3dke98?cf>`).
be part of the [[2017401]] and the linked zettel's [[5e41fd32]], use the
2-bracket syntax: (eg: `[[ef3dke98]]`).

```markdown
```
This is a zettel file, which refers to another zettel without
strongly linking to it:
branching to it:
* <ef3dke98?cf>
* [[ef3dke98]]
```

Neuron will link the zettels, but the link would be ignored from <2017401?cf>
as well as the <5e41fd32?cf> of zettel with ID "ef3dke98".
Neuron will link the zettels, but the link would be ignored from [[2017401]]
as well as the [[5e41fd32]] of the zettel.

## Advanced linking

* <2011506>

[^cf]:
> The abbreviation cf. (short for the Latin: *confer/conferatur*, both meaning "compare") is used in writing to refer the reader to other material to make a comparison with the topic being discussed. [Wikipedia](https://en.wikipedia.org/wiki/Cf.)
[^wikistyle]:
Neuron additionally supports "wiki-style" linking. `[[ef3dke98]]` is the
same as `<ef3dke98>`.

NOTE: This is an **experimental** feature; it will be changed when
the [Flexible links](https://github.com/srid/neuron/issues/312) proposal
gets implemented.

Wiki-style linking was added to allow users to edit their neuron
notes in existing Zettelkasten software like Zettlr. Note that those software
may not recognize the full range of Neuron links. See
[#229](https://github.com/srid/neuron/issues/229#issuecomment-645756080) for
details.
* [[[2011506]]]

[^autolink]:
Neuron used to use "autolink" style linking. `<ef3dke98>` is the
same as `[[[ef3dke98]]]`; and `<ef3dke98?cf>` is the same as
`[[ef3dke98]]`. Autolinks are supported for backwards compatibility only;
users are recommended to use the new wiki-style links.
10 changes: 5 additions & 5 deletions guide/2011505.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ tags:
---
```

Tags can be also be nested; see <535407ad>.
Tags can be also be nested; see [[[535407ad]]].

[^kw]: For interoperability with other Zettelkasten apps, neuron accepts "keywords" as an alternative to "tags" in the YAML frontmatter.
[^kw]: For interoperability with other Zettelkasten apps, neuron also accepts "keywords" as an alternative to "tags" in the YAML frontmatter.
:::

## Date

The creation date of the zettels can be specified in the "date" metadata field (`neuron new` automatically fills in this field):
The date of the zettels can be specified in the "date" metadata field (`neuron new` automatically fills in this field):

```markdown
---
date: 2020-04-07
date: 2020-08-21T13:06
tags:
- journal
---
```

The creation date can be made to display in a query result by using the `timeline` flag (see <2011506?cf>).
This date can be made to display in a query result by using the `timeline` flag (see [[2011506]]).

## Pinning

Expand Down
28 changes: 15 additions & 13 deletions guide/2011506.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
# Automatic links using queries

Neuron supports special link syntax that will query the Zettelkasten (eg: by tag) and insert the links using the query results.
Neuron supports special link syntax that will query the Zettelkasten (eg: by
tag) and create links based on the query results.

## Linking to multiple zettels by tag

You may create a query that will link to (and display) the matching zettels automatically. For
example, to link to a list of a zettels with the "science" tag (from the example
at <2011505?cf>):
at [[2011505]]):

```markdown
<z:zettels?tag=science&timeline>
```
[[z:zettels?tag=science&timeline]]
```

You can use the CLI to see which zettels will be included in a given query; see
<2013501?cf>.
[[2013501]].

### Example

As an example here is a list of zettels tagged "walkthrough" on this very
For example, here is a list of zettels tagged "walkthrough" on this very
Zettelkasten:

<z:zettels?tag=walkthrough&cf>
[[z:zettels?tag=walkthrough]]

It was created by `<z:zettels?tag=walkthrough&cf>`. Note that here we
use the `cf` flag to not affect the <2017401?cf> of the graph; whereas without
it, it will form the appropriate new category connections to the listed notes.
It was created by `[[z:zettels?tag=walkthrough]]`. Note that here we
use `[[..]]` to not affect the [[2017401]] of the graph; whereas if we had used
`[[[...]]]`, it will form the appropriate folgezettel connections to the listed
notes.

### Hierarchical tags

Queries can also link to zettels whose <535407ad?cf> match a glob pattern. For
instance, `<z:zettels?tag=science/*>` will link to all zettels tagged
Queries can also link to zettels whose [[535407ad]] match a glob pattern. For
instance, `[[z:zettels?tag=science/*]]` will link to all zettels tagged
"science/physics" and "science/biology".

Recursive globs are supported too, so if you want to include deeper nested tags,
`<z:zettels?tag=science/**>` will also match them (e.g.
`[[z:zettels?tag=science/**]]` will also match them (e.g.
"science/physics/kinematics"). This will also include zettels that are tagged
"science" only, though this behavior can be avoided by querying
"science/\*/\*\*" instead.
Expand Down
2 changes: 1 addition & 1 deletion guide/2012301.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Clusters

Your Zettelkasten may have two or more clusters, not [connected](https://en.wikipedia.org/wiki/Connected_graph) to one another. The z-index will display these clusters, with each cluster's <2017401?cf> rendered as a [forest](https://tinyurl.com/wikipedia-forest), whose roots (aka "[mother](https://www.geeksforgeeks.org/find-a-mother-vertex-in-a-graph/) zettels") could be considered as a portal zettel into that sub-Zettelkasten.
Your Zettelkasten may have two or more clusters, not [connected](https://en.wikipedia.org/wiki/Connected_graph) to one another. The z-index will display these clusters, with each cluster's [[2017401]] rendered as a [forest](https://tinyurl.com/wikipedia-forest), whose roots (aka "[mother](https://www.geeksforgeeks.org/find-a-mother-vertex-in-a-graph/) zettels") could be considered as a portal zettel into that sub-Zettelkasten.

2 changes: 1 addition & 1 deletion guide/2012401.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ In the future if you decide to upgrade neuron, simply change the revision hash t
## Systemd service

If you use [home-manager](https://github.com/rycee/home-manager), you can also
run neuron as a systemd service; see <6479cd5e>.
run neuron as a systemd service; see [[[6479cd5e]]].
Loading

0 comments on commit c51117d

Please sign in to comment.