Files
foam/docs/user/features/note-properties.md
sn3akiwhizper 6b2dda4a71 Documentation updates and cleaning (#1108)
* fixing some unmatched links, daily-note path note, start graphviz/tags/properties clarification

fixed links that didn't actually link to their target, add discussion about creating daily-notes in path based off date, then clarifying notes about styling graph viz and tags while enhancing the note properties descriptions by describing how properties are described and which properties are custom, which are foam-specific, and which are foam-template-specific

* add filter view, default variables to graphviz, and viewing tags in graphviz

graphviz: discuss filter view, add all changeable variables to graph style example, tags: describe viewing tags in the graphviz

* add small note about learning yaml

* last push fixing up some todos

* making recommended changes from PR request
2022-11-22 22:09:04 +01:00

2.3 KiB

type, keywords, tags
type keywords tags
feature hello world, bonjour
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 of the document and uses YAML formatting.

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:

---
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 seperators 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 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])

For example:

---
title: "Note Title"
type: "daily-note"
tags: daily, funny, planning

---

Foam Template Properties

There also exists properties that are even more specific to Foam templates, see [note-templates#Metadata] for more info.