mirror of
https://github.com/foambubble/foam-template.git
synced 2025-06-07 20:08:54 +00:00
51 lines
2.6 KiB
Markdown
51 lines
2.6 KiB
Markdown
---
|
|
type: feature
|
|
keywords: hello world, bonjour
|
|
tags: [hello, bonjour]
|
|
---
|
|
|
|
# Note Properties
|
|
|
|
At the top of the file you can have a section where you define your properties. This section is known as the [Front-Matter](https://learn.cloudcannon.com/jekyll/introduction-to-jekyll-front-matter/) of the document and uses [YAML formatting](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes).
|
|
|
|
> Be aware that this YAML section needs to be at the very top of the file to be valid.
|
|
|
|
For example, for this file, we have:
|
|
|
|
```markdown
|
|
---
|
|
type: feature
|
|
keywords: hello world, bonjour
|
|
---
|
|
```
|
|
|
|
This sets the `type` of this document to `feature` and sets **three** keywords for the document: `hello`, `world`, and `bonjour`. The YAML parser will treat both spaces and commas as the separators for these YAML properties. If you want to use multi-word values for these properties, you will need to combine the words with dashes or underscores (i.e. instead of `hello world`, use `hello_world` or `hello-world`).
|
|
|
|
> You can set as many custom properties for a document as you like, but there are a few [special properties](#special-properties) defined by Foam.
|
|
|
|
## Special Properties
|
|
|
|
Some properties have special meaning for Foam:
|
|
|
|
| Name | Description |
|
|
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| `title` | 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]]) |
|
|
| `type` | can be used to style notes differently in the graph (also see [[graph-visualization]]). The default type for a document is `note` unless otherwise specified with this property. |
|
|
| `tags` | can be used to add tags to a note (see [[tags]]) |
|
|
| `alias` | can be used to add aliases to the note. an alias will show up in the link autocompletion |
|
|
|
|
For example:
|
|
|
|
```markdown
|
|
---
|
|
title: "Note Title"
|
|
type: "daily-note"
|
|
tags: daily, funny, planning
|
|
alias: alias1, alias2
|
|
---
|
|
```
|
|
|
|
## Foam Template Properties
|
|
|
|
There also exists properties that are even more specific to Foam templates, see [[note-templates#Metadata]] for more info.
|
|
|