{"id":13479764,"url":"https://github.com/joplin/plugin-templates","last_synced_at":"2025-04-04T14:06:06.205Z","repository":{"id":38416954,"uuid":"371747652","full_name":"joplin/plugin-templates","owner":"joplin","description":"Create templates in Joplin and use them to create new notes and todos.","archived":false,"fork":false,"pushed_at":"2025-01-26T13:54:08.000Z","size":1361,"stargazers_count":166,"open_issues_count":34,"forks_count":24,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T13:08:05.465Z","etag":null,"topics":["hacktoberfest","joplin","joplin-plugin","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joplin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"nishantwrp","custom":"https://paypal.me/nishantwrp"}},"created_at":"2021-05-28T15:41:09.000Z","updated_at":"2025-03-18T12:17:38.000Z","dependencies_parsed_at":"2023-01-19T16:17:06.872Z","dependency_job_id":"f32b7030-8a19-4c2f-8224-48b617eafc40","html_url":"https://github.com/joplin/plugin-templates","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joplin%2Fplugin-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joplin%2Fplugin-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joplin%2Fplugin-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joplin%2Fplugin-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joplin","download_url":"https://codeload.github.com/joplin/plugin-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190249,"owners_count":20898702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","joplin","joplin-plugin","typescript"],"created_at":"2024-07-31T16:02:22.606Z","updated_at":"2025-04-04T14:06:06.181Z","avatar_url":"https://github.com/joplin.png","language":"TypeScript","funding_links":["https://github.com/sponsors/nishantwrp","https://paypal.me/nishantwrp"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    Templates Plugin\n    \u003cbr/\u003e\n    \u003ccenter\u003e\n        \u003cimg src=\"https://github.com/joplin/plugin-templates/actions/workflows/ci.yml/badge.svg\"\u003e\n        \u003ca href=\"https://npmjs.com/package/joplin-plugin-templates\"\u003e\u003cimg src=\"https://badge.fury.io/js/joplin-plugin-templates.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n        \u003cimg src=\"https://img.shields.io/badge/dynamic/json?color=brightgreen\u0026label=downloads\u0026query=%24.totalDownloads\u0026url=https%3A%2F%2Fjoplin-plugin-downloads.vercel.app%2Fapi%3Fplugin%3Djoplin.plugin.templates\"\u003e\n    \u003c/center\u003e\n\u003c/h1\u003e\n\nThis plugin allows you to create templates in Joplin and use them to create new notes and to-dos.\n\n## Table of contents\n\n- [Installing Plugin](#installing-plugin)\n- [Importing Legacy Templates](#importing-legacy-templates)\n- [Using the Template Plugin](#using-the-template-plugin)\n  - [Adding a new template](#adding-a-new-template)\n  - [Using templates](#using-templates)\n- [Features](#features)\n  - [Template variables](#template-variables)\n    - [Built in variables](#built-in-variables)\n    - [Custom variables](#custom-variables)\n      - [Advanced Usage](#advanced-usage)\n    - [Special variables](#special-variables)\n  - [Default Templates](#default-templates)\n  - [Using notebooks to store templates](#using-notebooks-to-store-templates)\n- [Changelog](#changelog)\n- [Supporting](#supporting)\n- [Contributing](#contributing)\n\n## Installing Plugin\n- Open Joplin\n- Go to Tools \u003e Options \u003e Plugins\n- Search for `Templates`\n- Click Install plugin\n- Restart Joplin to enable the plugin\n\n## Importing Legacy Templates\n- If you were already using the legacy version of templates, your templates will be automatically imported once you install the plugin. They will appear in an `Imported Templates - dd/mm/yyyy` notebook. See the `README` note in that notebook for more details.\n\n- Your existing templates will still be present in the templates directory but will be renamed from `.md` to `.md.old`. You can safely delete these old templates once you verify that they've been imported correctly in Joplin.\n\n## Using the Template Plugin\n\n### Adding a new template\nCreate templates by creating a new note or to-do in any notebook that:\n- Includes your template content\n- Is tagged with `template`\n\n### Using templates\nYou can access the templates options in `Tools` \u003e `Templates`.\n\n# Features\n\n## Template variables\n\n### Built in variables\nBuilt in variables are inserted automatically, without interaction from you. For example, in the following template, the date will be automatically added:\n\n```markdown\nDate: {{date}}\nHours:\nDetails:\n```\n\nThe currently supported built in template variables are:\n\n| Variable | Description | Example |\n| --- | --- | --- |\n| `{{date}}` | Today's date  | 2019-01-01 |\n| `{{time}}` | Current time  | 13:00 |\n| `{{datetime}}` | Current date and time  | 01/01/19 1:00 PM |\n| `{{#custom_datetime}}` | Current date and/or time formatted based on a supplied string (using [moment.js](https://momentjs.com/) formatting) | `{{#custom_datetime}}M d{{/custom_datetime}}` |\n| `{{bowm}}` | Date of the beginning of the week (when week starts on Monday) | |\n| `{{bows}}` | Date of the beginning of the week (when week starts on Sunday) | |\n\n\u003e **NOTE**: All dates are formatted based on your Joplin settings in `General \u003e Date Format`\n\n### Custom variables\nYou can also define custom variables in your template that prompt you to enter a value when you use the template. For example in the following example the name and color variables will prompt you each time you use the template:\n\n```markdown\n---\nname: text\ncolor: dropdown(Red, Yellow, Green)\n\n---\n\nHi there, {{ name }}. Your favorite color is {{ color }}. This note/to-do was created on {{ datetime }}.\n```\n\nThe currently supported custom variable types are:\n\n| Type | Example |\n| --- | --- |\n| `text` | name: text |\n| `number` | count: number |\n| `boolean` | show_summary: boolean |\n| `date` | meeting_date: date |\n| `time` | meeting_time: time |\n| `dropdown` | color: dropdown(Red, Yellow) |\n\n**Points to note**\n- You can't use special characters (\"@\", \",\", \"#\", \"+\", \"(\", etc.) or spaces in variable names. However, you can use \"_\" in variable names.\n- If you declare a custom variable with same name as the built-in variables, the custom variable value will be used.\n- Internally, [Handlebars.Js](https://handlebarsjs.com/) is used to compile the templates. You can write templates to be compatible with `Handlebars`.\n\n#### Advanced Usage\nYou can also define a `label` for each custom variable. Label is something that appears instead of the variable name in the variables input dialog. You can use the following syntax to do so.\n\n```markdown\n---\nname: text\nproject:\n  label: Select a project\n  type: dropdown(project 1, project 2, project 3)\nshow_summary:\n  label: Add summary in note?\n  type: boolean\n\n---\n\nHi {{ name }},\nThis is a report for {{ project }}.\n\n{{#if show_summary}}\n## Summary\n\u003e Enter the summary here.\n{{/if}}\n\n\n```\n\n**Points to note**\n- The indentation should be `2 spaces` exactly. Don't use tabs for indentation otherwise it can result in errors.\n\n### Special variables\n\nThese are the variables that have a specific purpose other than being used in templates. Some of the important features of these special variables are\n\n- Both built-in and custom variables can be used while defining these variables.\n- The values of these variables can be used in the template body just like built-in and custom variables.\n\nCurrently there are two special variables.\n\n| Variable | Purpose | Example |\n| --- | --- | --- |\n| `template_title` | Title of the note/to-do created using this template. | template_title: Standup - {{ date }} |\n| `template_tags` | Comma separated tags to be applied to the note/to-do created  using this template. | template_tags: spec, {{ project }} |\n| `template_notebook` | The ID of the target notebook for this template. Whenever a new note/to-do will be created by this template, it will be created in this target notebook. | template_notebook: 82d2384b025f44588e4d3851a1237028 |\n\n**Points to note**\n- If `template_title` is not provided, the title of the template will be used as a fallback value.\n- If a tag specified in `template_tags` doesn't exist already, it will be created.\n- You can't use these variable names i.e. `template_title` and `template_tags` for custom variables. In general, please avoid defining custom variables with `template_` prefix.\n- To get the ID of a notebook, you can right click on that notebook and click on `Copy notebook ID`.\n- While you are inserting the template in an existing note/to-do, `template_tags` variable is used to apply those tags to the note the template is inserted in. However, you can disable using `template_tags` while inserting templates from the plugin settings.\n\n**Example of a template using special variables**\n\n```markdown\n---\nproject: dropdown(project 1, project 2)\ntemplate_title: Weekly Meet - {{ project }} - {{ date }}\ntemplate_tags: meeting notes, {{ project }}\n\n---\n\n## {{ template_title }}\n\nThis note contains the meeting minutes of the weekly meet held on {{ datetime }} for {{ project }}.\n```\n\n## Default Templates\nYou can define the templates you use the most as default templates. Currently you can have two default templates. One for `notes` and one for `to-dos`. You can also assign keyboard shortcuts to these defaults, so that you can quickly create a new note/to-do with the respective default template.\n\n## Using notebooks to store templates\nThe plugin also supports using notebooks to store templates instead of tags. You can start using notebooks to store your templates by going to the plugin settings and selecting `Notebook` instead of `Tag`.\n\nNow, any note or todo placed in a notebook titled \"Templates\" will be considered a template.\n\n## Changelog\nSee [CHANGELOG.md](https://github.com/joplin/plugin-templates/blob/master/CHANGELOG.md).\n\n## Supporting\nYou can support the development of this plugin through [PayPal](https://paypal.me/nishantwrp). Also, do consider supporting the development of the main Joplin app through the official [donate page](https://joplinapp.org/donate/).\n\n## Contributing\nContributions to this plugin are most welcome. Feel free to open a pull request or an issue. Make sure to use [conventional commit messages](https://www.conventionalcommits.org/en/v1.0.0/) if you're creating a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoplin%2Fplugin-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoplin%2Fplugin-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoplin%2Fplugin-templates/lists"}