generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Template Variables
Björn Platte edited this page Feb 9, 2026
·
2 revisions
This page documents all available template variables for filename and content templates.
| Variable | Description | Example |
|---|---|---|
{title} |
Issue/PR title | Fix login bug |
{title_yaml} |
Issue/PR title (YAML-escaped) | Fix \"login\" bug |
{number} |
Issue/PR number | 123 |
{status} |
Current status |
open, closed
|
{state} |
Alias for status |
open, closed
|
{author} |
Username who created it | lonoxx |
{body} |
Issue/PR description | Full description text |
{url} |
Web URL | https://github.com/... |
{repository} |
Full repository name | owner/repo |
{owner} |
Repository owner | owner |
{repoName} |
Repository name only | repo |
{type} |
Type identifier |
issue or pr
|
| Variable | Description | Example |
|---|---|---|
{assignee} |
Primary assignee | lonoxx |
{assignees} |
Comma-separated list | lonoxx, DevRaffael |
{assignees_list} |
Bulleted list |
- lonoxx- DevRaffael
|
{assignees_yaml} |
YAML array | ["lonoxx", "DevRaffael"] |
| Variable | Description | Example |
|---|---|---|
{labels} |
Comma-separated list | bug, critical |
{labels_list} |
Bulleted list |
- bug- critical
|
{labels_hash} |
Hashtags | #bug #critical |
{labels_yaml} |
YAML array | ["bug", "critical"] |
| Variable | Description | Example |
|---|---|---|
{created} |
Creation date | 2026-01-15 |
{updated} |
Last update date | 2026-01-20 |
{closed} |
Closed date (if closed) | 2026-01-25 |
| Variable | Description | Example |
|---|---|---|
{mergedAt} |
Merge date (if merged) | 2026-01-25 |
{mergeable} |
Can be merged |
true, false
|
{merged} |
Is merged |
true, false
|
{baseBranch} |
Target branch | main |
{headBranch} |
Source branch | feature/login |
{requested_reviewers} |
Requested reviewers (frontmatter only) | ["reviewer1", "reviewer2"] |
| Variable | Description | Example |
|---|---|---|
{milestone} |
Milestone title | v1.0.0 |
{commentsCount} |
Number of comments | 5 |
{isLocked} |
Is locked |
true, false
|
{lockReason} |
Lock reason | resolved |
{comments} |
Formatted comments section | (Content templates only) |
| Variable | Description | Example |
|---|---|---|
{project} |
Project title | My Project |
{project_url} |
Project URL | https://github.com/... |
{project_number} |
Project number | 1 |
{project_status} |
Item status | In Progress |
{project_priority} |
Priority field | High |
{project_iteration} |
Iteration title | Sprint 1 |
{project_iteration_start} |
Iteration start date | 2026-01-01 |
{project_iteration_duration} |
Iteration duration (days) | 14 |
{projects} |
All projects (comma-separated) | Project A, Project B |
{projects_yaml} |
Projects as YAML array | ["Project A", "Project B"] |
{project_fields} |
Custom fields as YAML | See below |
{project_field:FieldName} |
Access custom field by name | Dynamic |
| Variable | Description | Example |
|---|---|---|
{sub_issues_count} |
Total number of sub-issues | 5 |
{sub_issues_open} |
Number of open sub-issues | 3 |
{sub_issues_closed} |
Number of closed sub-issues | 2 |
{sub_issues_progress} |
Progress indicator | 2 of 5 |
{sub_issues} |
Comma-separated links | [#1](url), [#2](url) |
{sub_issues_list} |
List with status icons | See Sub-Issues |
{sub_issues_simple_list} |
List without status icons | - [[Issue - 1|#1 Title]] |
{sub_issues_yaml} |
YAML array of numbers | [1, 2, 3] |
{sub_issues_numbers} |
Hash-prefixed numbers | #1, #2, #3 |
| Variable | Description | Example |
|---|---|---|
{parent_issue} |
Parent issue title | Main Feature |
{parent_issue_number} |
Parent issue number | 100 |
{parent_issue_url} |
Parent issue URL | https://github.com/... |
{parent_issue_link} |
Markdown link | [#100 Title](url) |
{parent_issue_state} |
Parent issue state |
open, closed
|
Use {variable:content} to show content only if the variable has a value.
{variable:Content to show if variable exists}
{closed:- **Closed:** {closed}}
{milestone:- **Milestone:** {milestone}}
{sub_issues:## Sub-Issues\n{sub_issues_list}}
{parent_issue:- **Parent:** {parent_issue_link}}-
closed- Shows content if issue is closed -
updated- Shows content if updated date exists -
mergedAt- Shows content if PR is merged -
milestone- Shows content if milestone is set -
assignee/assignees- Shows content if assigned -
labels- Shows content if labels exist -
body- Shows content if body is not empty -
project/projects- Shows content if in a project -
project_status/project_priority- Shows content if fields are set -
project_iteration- Shows content if in an iteration -
sub_issues- Shows content if has sub-issues -
parent_issue- Shows content if has parent issue
For advanced template features like if/elif/else blocks, value mappings, and dynamic project fields, see Template-Logic.