Skip to content

Files

A Markdown File

Notes are written using Markdown files (GitHub Flavored Markdown is supported).

notes.md
# My Notebook
A file is a Markdown document structured using headings.
## Notes
### Note: Example
Only headings starting with a known prefix such as `Note:` or `Flashcard:` are
considered as notes and processed by _The NoteWriter_.
### Note: Another Example
Notes can use **Markdown syntax** such as code blocks, quotes, images, tables.

A YAML Front Matter can also present at the top of a file to declare common attributes:

review.md
---
draft: true
---
# Note: My Review
It's a book containing pages.

Many Markdown Files

You can organize your Markdown files using a tree structure. Check the directory examples/ to have a better idea of what a note repository could look like.

Ignore Markdown Files

You may want to exclude some files from being parsed by The NoteWriter. Two solutions exist:

  • Use the special tag ignore:
ignore.md
---
tags: ignore
---
This file will be ignored when adding files using `nt add`.
  • Exclude files by declaring glob patterns inside a file .ntignore present at the root of your repository:
/archives/**/*.md # Any Markdown file under archives/
# will be ignored

Working with Files

After editing your Markdown files, you will use the command nt add to add them to The NoteWriter. This command parses your files and extracts different objects, covered in the following pages, and make them accessible in the desktop application.

Terminal window
$ echo "# My Notes" > nodes.md
$ nt add .
# The file is now visible in the desktop application

When using remotes to push your notes (ex: to your phone), only committed objects will be pushed.

Terminal window
$ nt commit
# Objects can now be pushed
$ nt push phone # Expect a remote "phone" to have been declared

In practice, you will use the command nt along the command git and will add/commit your changes at the same time.