---
title: Templates
description: Create reusable content structures for consistent note-taking
---

Templates in Octarine allow you to create reusable blocks of content that can be quickly inserted into any note. Unlike page-level templates in other apps, Octarine treats templates as insertable blocks, giving you the flexibility to use multiple templates within a single note.

### The Basics

Templates are stored in a dedicated `.templates` folder in your workspace. Each template is a standard markdown file containing the content structure you want to reuse. When applied, the template's content is inserted at your cursor position, not as a new note.

- **Block-based approach**: Templates represent content blocks, not entire pages
- **Multiple templates per note**: Use several templates to build different sections of the same note
- **Standard markdown files**: Templates are regular `.md` files you can edit with any text editor
- **Instant insertion**: Template content appears immediately at your cursor location

### Creating Templates

Navigate to template creation through these methods:

- **Click** the Templates icon in the sidebar to open the Templates view
- Press `New template`

When creating a template:

- Give it a descriptive name that explains its purpose
- Include any markdown formatting, headers, lists, or task structures
- Add placeholder text where variable content will go

### Template Variables

Templates support inline variables that get replaced when the template is inserted or used to create a new note. Variables use double curly braces and can include an optional format for dates and times.

Available variables:

- `{{title}}`: Current note title (filename without `.md`)
- `{{date}}`: Current date in `yyyy-MM-dd`
- `{{date:FORMAT}}`: Current date with a custom date-fns format
- `{{time}}`: Current time in `HH:mm`
- `{{time:FORMAT}}`: Current time with a custom date-fns format

> Format for date and time need to be in accordance with date-fns syntax. Please read about them in their [documentation](https://date-fns.org/v4.1.0/docs/format)

Example:

```markdown
# {{title}}

Created: {{date:MMMM d, yyyy}} at {{time}}
```

Variables work in template body content, and they also resolve in template frontmatter when you create a new note from a template.

### Using Templates

<Image src='https://pub-d9b2979edab5442388c14f8014e177b7.r2.dev/docs/insert_template.png' width={300} />

Apply templates to your notes using these methods:

- On an empty line, press `/` and search for your template name

The template content inserts at your current cursor position. You can then edit the inserted content as needed, replacing placeholders with actual information.

### Creating notes from templates

Create a new note with content from a template pre-populated by using `CMD/Ctrl + K` and choose the `Create note from template` command with your template selected.

Any property assigned to the template is also applied to the new note.

#### Quick Answers

### Where are Octarine templates stored?

Templates are Markdown files stored in the `.templates` folder inside your workspace.

### Do templates create whole notes or insert blocks?

Templates can be inserted as reusable content blocks, and they can also pre-populate new notes through the **Create note from template** command.

### Can Octarine templates use variables?

Yes. Templates support variables like `{{title}}`, `{{date}}`, `{{time}}`, and formatted date or time values.
