Added onboarding and major changes to template (#28)

* removed gitlens

* adjusted various settings

* added foam onboarding to template

* removed prettier extension

* added setting to match OS color scheme

* a couple of minor changes re todos and readme

* added spellright to list of recommended extensions, and added to getting started guide

* added reference to LTeX in spell checking doc

* Added logo to readme

* fixed link to LTeX extension

* styling logo in readme

* more style experiments
This commit is contained in:
Riccardo
2021-01-22 14:17:24 +01:00
committed by GitHub
parent 3fded1a423
commit d9028e82fb
20 changed files with 448 additions and 31 deletions

View File

@ -0,0 +1,44 @@
# Daily Notes
Daily notes allow you to quickly create and access notes for today.
Try it out, run the `Foam: Open Daily Note` command.
## Shortcuts and Snippets
You can quickly open today's daily note by pressing `alt+d`.
You can also quickly create link to your daily notes, in the configured format, using [snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets).
Type `/today` and press `enter` to link to today's note.
You can also write:
| Snippet | Date |
| ------------ | ------------- |
| `/tomorrow` | tomorrow |
| `/yesterday` | yesterday |
| `/monday` | next monday |
| `/+1d` | tomorrow |
| `/-3d` | 3 days ago |
| `/+1w` | in a week |
| `/-1m` | one month ago |
| `/+1y` | in one year |
You get the idea ;)
## Configuration
It's possible to customize path and heading of your daily notes, by following the [dateformat masking syntax](https://github.com/felixge/node-dateformat#mask-options).
The following properties can be used:
```json
"foam.openDailyNote.directory": "journal",
"foam.openDailyNote.filenameFormat": "'daily-note'-yyyy-mm-dd",
"foam.openDailyNote.fileExtension": "mdx",
"foam.openDailyNote.titleFormat": "'Journal Entry, ' dddd, mmmm d",
```
The above configuration would create a file `journal/note-2020-07-25.mdx`, with the heading `Journal Entry, Sunday, July 25`.

View File

@ -0,0 +1,43 @@
# Graph Visualization
Foam comes with a graph visualization of your notes.
To see the graph execute the `Foam: Show Graph` command.
## Graph Navigation
With the graph you can:
- highlight a node by hovering on it, to quickly see how it's connected to the rest of your notes
- select one or more (by keeping `shift` pressed while selecting) nodes by clicking on them, to better understand the structure of your notes
- navigate to a note by clicking on it while pressing `ctrl` or `cmd`
- automatically center the graph on the currently edited note, to immediately see it's connections
## Custom Graph Styles
By default the Foam graph will use the VsCode theme, but it's possible to customize it with the `foam.graph.style` setting.
A sample configuration object is provided below, you can provide as many or as little configuration as you wish:
```json
"foam.graph.style": {
"background": "#202020",
"fontSize": 12,
"highlightedForeground": "#f9c74f",
"node": {
"note": "#277da1",
"placeholder": "#545454",
"feature": "green",
}
}
```
- `note` defines the color for regular nodes
- `placeholder` defines the color for links that don't match any existing note. This is a [[placeholder]] because no file with such name exists (see [[wiki-links]] for more info).
- `feature` shows an example of how you can use note types to customize the graph. It defines the color for the notes of type `feature`
- see [[note-properties]] for details
- you can have as many types as you want
[//begin]: # "Autogenerated link references for markdown compatibility"
[wiki-links]: wiki-links.md "Wiki Links"
[note-properties]: note-properties.md "Note Properties"
[//end]: # "Autogenerated link references"

View File

@ -0,0 +1,30 @@
# Link Reference Definitions
When you use `[[wiki-links]]`, the [foam-vscode](https://github.com/foambubble/foam/tree/master/packages/foam-vscode) extension will automatically generate [Markdown Link Reference Definitions](https://spec.commonmark.org/0.29/#link-reference-definitions) at the bottom of the file.
This is done to make the content of the file compatible with various Markdown tools (e.g. parsers, static site generators, VS code plugins etc), which don't support `[[wiki-links]]` directly.
## Example
The following example:
```md
- [[graph-visualization]]
```
...generates the following link reference definitions to the bottom of the file:
```md
[graph-visualization]: graph-visualization "Graph Visualization"
```
## Configuration
You can use the `foam.edit.linkReferenceDefinitions` to configure the definitions (see [[get-started-with-vscode]]):
- `withoutExtensions` (default): this works better with certain web publishing tools (e.g. GitHub pages)
- `withExtensions`: this works better with standard markdown-based tools (e.g GitHub web UI)
- `off`: this disables the generation of definitions
After changing the setting in your workspace, you can run the `Foam: Run Janitor (Experimental)` command to convert all existing definitions.
[//begin]: # "Autogenerated link references for markdown compatibility"
[get-started-with-vscode]: ../how-to/get-started-with-vscode.md "Getting started with VsCode"
[//end]: # "Autogenerated link references"

View File

@ -0,0 +1,34 @@
---
type: feature
keywords: hello world
---
# Note Properties
At the top of the file you can have a section where you define your properties.
> Be aware that this section needs to be at the very top of the file to be valid
For example, for this file, we have:
```
---
type: feature
keywords: hello world
---
```
Those are properties.
Properties can be used to organize your notes.
## Special Properties
Some properties have special meaning for Foam:
- the `title` property will assign the name to the note that you will see in the graph, regardless of the filename or the first heading (also see how to [[write-notes-in-foam]])
- the `type` property can be used to style notes differently in the graph (also see [[graph-visualization]])
- the `tags` property can be used to add tags to a note (see [[tags-and-tag-explorer]])
[//begin]: # "Autogenerated link references for markdown compatibility"
[write-notes-in-foam]: ../how-to/write-notes-in-foam.md "Writing Notes"
[graph-visualization]: graph-visualization.md "Graph Visualization"
[tags-and-tag-explorer]: tags-and-tag-explorer.md "Tags and Tag Explorer"
[//end]: # "Autogenerated link references"

View File

@ -0,0 +1,8 @@
# Note Templates
You can create notes from templates by running the `Foam: Create New Note from Template` command and follow the instructions.
To create a template, just add regular `.md` files in `.foam/templates` (create the directory if necessary).
Templates can use all the variables available in [VsCode Snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables).

View File

@ -0,0 +1,16 @@
# Spell Checking
Foam come with a spell checker.
Misspelled words are highlighted, like hellow.
You can place the cursor on top of the word, and press `cmd+.` for suggestions on how to fix the problem.
You can configure the extension in the settings, for example to:
- ignore certain files
- change the language(s)
- and much more
For more information go to the [Spellright extension page](https://marketplace.visualstudio.com/items?itemName=ban.spellright).
There are many spell checking extensions for VsCode.
Another one of our favorites is [LTeX](https://marketplace.visualstudio.com/items?itemName=valentjn.vscode-ltex&ssr=false#overview), which is a bit heavier but offers some extra functionality.

View File

@ -0,0 +1,24 @@
---
tags: my-tag1 my-tag2
---
# Tags and Tag Explorer
## Tags
You can add tags to your notes to categorize them, or in any way you want.
There are two ways to add tags:
- you can add #tags just by writing them in the note
- another way is through [[note-properties]], as you can see at the top of this file
## Tag Explorer
In the sidebar to the left, you will see a panel called `Tag Explorer`.
You can use this panel to see the tags in your notes, and navigate them.
Notice `my-tag1` and `my-tag2`, which were added via [[note-properties]].
[//begin]: # "Autogenerated link references for markdown compatibility"
[note-properties]: note-properties.md "Note Properties"
[//end]: # "Autogenerated link references"

View File

@ -0,0 +1,14 @@
# Wiki Links
Wiki links are the internal links that connect the files in your knowledge base.
To create a wiki link use `[[` and type the name of another file in your repo, for example [[graph-visualization]]
You can also create a [[placeholder]].
A placeholder is a wiki link that doesn't have a target file.
They can still be helpful to highlight connections.
Open the graph with `Foam: Show Graph` command, and look at the placeholder node.
[//begin]: # "Autogenerated link references for markdown compatibility"
[graph-visualization]: graph-visualization.md "Graph Visualization"
[//end]: # "Autogenerated link references"