Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avirut/obsidian-metatemplates
Take advantage of YAML front-matter in generating notes from templates (for obsidian.md)
https://github.com/avirut/obsidian-metatemplates
obsidian obsidian-md obsidian-plugin
Last synced: 2 months ago
JSON representation
Take advantage of YAML front-matter in generating notes from templates (for obsidian.md)
- Host: GitHub
- URL: https://github.com/avirut/obsidian-metatemplates
- Owner: avirut
- Created: 2021-01-06T04:16:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T16:04:41.000Z (almost 3 years ago)
- Last Synced: 2024-08-02T05:11:27.737Z (5 months ago)
- Topics: obsidian, obsidian-md, obsidian-plugin
- Language: TypeScript
- Homepage:
- Size: 205 KB
- Stars: 108
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- project-awesome - avirut/obsidian-metatemplates - Take advantage of YAML front-matter in generating notes from templates (for obsidian.md) (TypeScript)
- jimsghstars - avirut/obsidian-metatemplates - Take advantage of YAML front-matter in generating notes from templates (for obsidian.md) (TypeScript)
README
# obsidian-metatemplates
Take advantage of YAML front-matter in generating notes from templates## Disclaimer
I haven't really tested this plugin at all on any vaults but my own, and there are likely many places where the appropriate checks for `null` or `undefined` values are missing. Therefore, you may experience significant errors early on. When this happens, please open DevTools (`ctrl/cmd + shift + i`), save the console error output, and report it as an issue through this repository's `Issues` tab. This plugin *shouldn't* delete your files or anything, but it may just occassionally not work as expected.## Frontmatter-based templates
This plugin is more or less intended to be used as a replacement for the core `templates` plugin.
![sample template](https://github.com/avirut/obsidian-metatemplates/blob/master/imgs/template-sample.png?raw=true)## Usage
First, refer to plugin settings and specify a template folder location as well as desired date and time formats.Each template is distinguished by its `type` property in the frontmatter. You then can additionally specify a `nameFormat` property and a `destFolder` property. The `nameFormat` property will be used to dynamically rename other notes elsewhere in your Obsidian vault (but outside of the templates folder) that are of the same `type`. That is, any template with a `nameFormat` specified will apply to other notes that were generated using that template. The `nameFormat` property draws from the other frontmatter attributes for each file, and updates automatically when there are changes to the frontmatter.
The `destFolder` property is used along with the `metatemplates: Create from template` command (available in the command pallette and assignable to a hotkey via settings). When this property is specified, any notes created from that template will be automatically placed in the specified location (relative path to vault root).
The dynamically filled upon note insertion/creation values `{{date}}` and `{{time}}` are replaced by `<>` and `<
## Sample Output
![sample output](https://github.com/avirut/obsidian-metatemplates/blob/master/imgs/from-template.png?raw=true)## Credits
Thanks to Liam and Licat in the Discord #plugins channel for their frequent help!