Liquid Templates

by Diomede Tripicchio
5
4
3
2
1
Score: 41/100

Description

Category: Note Enhancements

The Liquid Templates plugin for Obsidian is a powerful tool that allows you to write your own templates using LiquidJS tags. With this plugin, you can create reusable templates and automate the process of generating notes with common headers, footers, and other elements. The plugin also comes with an autocomplete feature that helps you quickly find and insert template variables.

One of the most exciting features of this plugin is its support for custom filters. You can use these filters to manipulate dates and times in your templates, making it easy to create templates that display dates and times in a specific format. For example, you can use the date filter to display the current date or yesterday's date.

The plugin also includes a range of built-in filters, including days_ago and days_after, which allow you to easily calculate dates and times relative to the current date. This makes it easy to create templates that display notes from specific periods in the past or future.

Overall, the Liquid Templates plugin is a valuable tool for Obsidian users who want to streamline their note-taking process and create reusable templates with ease.

Reviews

No reviews yet.

Stats

22
stars
5,579
downloads
0
forks
1,812
days
1,543
days
1,543
days
5
total PRs
0
open PRs
0
closed PRs
5
merged PRs
4
total issues
2
open issues
2
closed issues
0
commits

Latest Version

4 years ago

Changelog

README file from

Github

Liquid Templates

This is a plugin for Obsidian (https://obsidian.md).

With this plugin, you can write your templates using LiquidJS tags

Disclaimer

This plugin is still under heavy development, so it's not optimized yet and has basic features.

Autocomplete

There is an autocomplete feature that by default is triggered by ;; but can be customized in the options

Examples

This means that you can create a template made from smaller ones, for example (assuming that your templates folder is templates):

templates/header.md

# Header

Insert a common header

templates/footer.md

---
I'm just a footer

templates/awesome_template.md

{% include "header" %}

This is the body of my note: {{title}}
link to today note [[{{date}}]]

{% include "footer" %}

When you create a note with the "Awesome template" template, you'll end up with:

A cool title.md

# Header

Insert a common header

This is the body of my note: A cool title
link to today note [[2021-05-21]

---
I'm just a footer

But other than that, you can use all the basic tags and filters

Custom Filters

For now I'll keep the documentation of the filters here, when they become more I'll move it somewhere more convenient

date filter

The LiquidJS built-in date filter has been replaced with a custom one. For now, if there is a % character in the date format the old filter is used, otherwise the new one will take place.

The new date filter uses date-fns as library to handle dates, and the format strings to use are showed here: date-fns formats

There are also some special words that can be used with this filter:

"now" {{ "now" | date: "yyyy-MM-dd" }} Use the date from new Date and formatted with the given format

"today" {{ "today" | date: "yyyy-MM-dd" }} same as now

"yesterday" {{ "yesterday" | date: "yyyy-MM-dd" }} use the subDays function to subtract 1 from Date.now() and formatted with the given format

"tomorrow" {{ "tomorrow" | date: "yyyy-MM-dd" }} use the addDays function to add 1 to Date.now() and formatted with the given format

date Default format

Now you can use the "Date Format" you defined inside the plugin settings in a easier way:

Before: {{ "now" | date: default_date_format }}

Now: {{ "now" | date }} the format you specified in the settings is now used as default

days_ago filter

A simple filter that uses the subDays to subtract days from the current date (Date.now())

Keep in mind that this filter returns a date that needs to be formatted, so needs to be used with the date filter, like this:

  • {{ 1 | days_ago | date }} same as {{ "yesterday" | date }}
  • {{ 2 | days_ago | date }} return the date from two days ago

This can be used for a "Weekly Review" template, something like:

- [[{{ 7 | days_ago | date }}]]
- [[{{ 6 | days_ago | date }}]]
- [[{{ 5 | days_ago | date }}]]
- [[{{ 4 | days_ago | date }}]]
- [[{{ 3 | days_ago | date }}]]
- [[{{ 2 | days_ago | date }}]]
- [[{{ 1 | days_ago | date }}]]

days_after filter

A simple filter that uses the addDays to add days to the current date (Date.now())

Keep in mind that this filter returns a date that needs to be formatted, so needs to be used with the date filter, like this:

  • {{ 1 | days_after | date }} same as {{ "tomorrow" | date }}
  • {{ 2 | days_after | date }} return the date from two days from now

Template context

Other than the classic, date, time and title variable you also have:

Name Description
default_date_format The date format that you have specified in the plugin settings and can be used like this: {{ "now" | date: default_date_format }}
default_time_format The time format that you have specified in the plugin settings and can be used like this: {{ "now" | date: default_time_format }}

Roadmap

For now, this plugin just includes the basic version of LiquidJS, but I want to extend it to allow:

  • Add autocomplete to the template folder, excluded folder settings
  • Implement a fuzzy finder for the autocomplete
  • Implement/install a filter that allows you to write {{ 1 | days_ago | date: default_date_format }}
  • Parse a selected template string, something like you select {{ "dQw4w9WgXcQ" | youtube_iframe }} run a command and end up with the parsed result, in this case, the youtube iframe. (the youtube_iframe tag does not exist yet)

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Templater
6 years ago by SilentVoid
A template plugin for obsidian
Tag Wrangler
5 years ago by PJ Eby
Rename, merge, toggle, and search tags from the Obsidian tag pane
Buttons
5 years ago by Sam Morrison
Buttons in Obsidian
Colored Tags
3 years ago by Pavel Frankov
Colorizes tags in different colors.
Collapse All
5 years ago by Nathonius
Colored Tags Wrangler
2 years ago by AndreasSasDev
Obsidian Plugin : Assign colors to tags. Has integrations with other plugins, like Kanban.
Auto Template Trigger
3 years ago by Numeroflip
An obsidian.md plugin, to automatically trigger a template on new file creation
Hotkeys for templates
5 years ago by Vinzent
Frontmatter Tag Sugest
4 years ago by Jonathan Miller
Autocompletes tags in Obsidian YAML frontmatter. No more deleting #!
Daily Named Folder
5 years ago by Nemo Andrea
Like daily note, but nested in a daily folder and some more improvements
Multi Tag
3 years ago by fez-github
Obsidian plugin that allows the user to add a tag to all files in a folder. Not in active development. Now working on Multi-Properties, which covers most of this plugin's functionality.
Nested tags graph
3 years ago by drpilman
A small plugin for Obsidian that links nested tags in graph view
Tags Overview
3 years ago by Christian Wannerstedt
Obsidian plugin which adds an extended tags panel where tagged files can be overviewed, filtered and accessed in an easy way.
HTML Tags Autocomplete
5 years ago by bicarlsen
Autocomplete HTML formatting tags.
AutoMOC
4 years ago by Diego Alcantara
Auto Classifier
3 years ago by Hyeonseo Nam
Auto classification plugin for Obsidian using ChatGPT.
Tags Routes
2 years ago by Ken
This is a plugin for obsidian, to visualize files and tags as nodes in 3D graph.
Canvas Filter
3 years ago by Ivan Koshelev
Obsidian Canvas plugin that let's you show only pages / arrows with specific tags / colors / connections.
Note Auto Creator
4 years ago by Simon T. Clement
An Obsidian plugin for automatically creating notes when linking to non-existing notes
Quick Tagger
2 years ago by Gorkycreator
Quick tagger for Obsidian.md
From Template
4 years ago by mo-seph
Simple plugin to create Notes from a template, and fill in fields defined there
Smart Templates
2 years ago by 🌴 Brian Petro
Smart Templates is an AI powered templates for generating structured content in Obsidian. Works with Local Models, Anthropic Claude, Gemini, OpenAI and more.
Tag Page
3 years ago by Matthew Sumpter
An Obsidian plugin to create and manage dedicated Markdown pages for tags, with features to automatically populate and refresh content based on user-defined settings.
Smart Title
2 years ago by magooup
obsidian-plugin-smart-title
Reading comments
3 years ago by BumbrT
Reading comments, for consuming books or large articles in markdown with https://obsidian.md/.
Obsidian Dynamic Embed
4 years ago by Ivaylo Dimitrov Dabravin
Insta TOC
a year ago by Nick C.
Generate, update, and maintain a table of contents for your notes while typing in real time.
YouTube Template
2 years ago by sundevista
📺 A plugin that would help you to fetch YouTube videos data into your vault.
Templify
2 years ago by Boninall
A releases repo for custom editable template in Obsidian.
Visual Crossing Weather
a year ago by willasm
Base Tag Renderer
3 years ago by Darren Kuro
A lightweight obsidian plugin to render the basename of tags in preview mode.
Media Companion
a year ago by Nick de Bruin
Character Sheets
10 months ago by Grayvox
Create character sheets for your very own traumatized little guys with Obsidian.
QuickLink
8 months ago by Jamba Hailar
On obsidian, use @ to quickly link files
Metadata Auto Classifier
2 years ago by Beomsu Koh
AI-powered Obsidian plugin that automatically classifies and generates metadata (tags, frontmatter) for your notes.
Tag Buddy
2 years ago by David Fasullo
Unlock powerful tag editing features in Reading Mode. Add, remove and edit tags across your vault. Use tag inboxes to level up any workflow with a powerful idea assembly line.
FuzzyTag
3 years ago by Adrian
Note to RED
a year ago by Yeban
一键将 Obsidian 笔记转换为小红书图片进行导出
Meld Build
3 years ago by meld-cp
Write and execute (sandboxed) JavaScript to render templates, query DataView and create dynamic notes.
Tag Group Manager
5 months ago by Stargazer-cc
Tag Group Manager is a plugin designed for Obsidian that helps manage tag groups and quickly insert tags.
Advanced Copy
2 years ago by leschuster
An Obsidian plugin to copy Markdown and transform it into HTML, Anki, or any custom format. Create custom profiles with versatile templates tailored to your workflow.
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
EmoTagsTitler
3 years ago by Cyfine
Obsidian Attendance
4 years ago by Tiim
Attendance tracking using obsidian.md
Workona To Obsidian
3 years ago by Holmes555
Plug-in for Obsidian.md which will import Workona json file
Testing Vault
3 years ago by Michael Pedersen
Ruled template
3 years ago by YPetremann
An obsidian plugin that check rules to select which template to use.
Micro templates
3 years ago by epszaw
Flexible embedded micro templates powered by javascript functions
Search Templates Library
3 years ago by Pentchaff
Obsidian plugin that allows to store searches templates for later use, and displays search results both in the search view and graph view.
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
Related Notes by Tag
9 months ago by Chris Howard
displays notes that share tags with your currently active note
Default Template
4 months ago by raeperd
obsidian plugin to set default template for new notes
Blueprint
3 months ago by François Vaux
Repeatable templates plugin for Obsidian
Smart Export
2 months ago by Iván Sotillo
Plugin that follows wikilinks to a configurable depth, joining the notes into a single export.
Generate Timeline
a year ago by Shanshuimei
An obsidian plugin to generate timelines from tags, folders, files or metadata automatically. 根据标签,文件夹,文件或者属性自动生成时间轴的插件。
Index Notes
2 years ago by Alejandro Daniel Noel
Plugin that automatically generates index blocks based on tags
Tag Breakdown Generator
3 years ago by Hananoshika Yomaru
Break down nested tags into multiple parent tags
Note 2 Tag Generator
2 years ago by Augustin
Templated daily notes
2 years ago by digitorum
Allow to create templayted daily note in specific folder
Tag Formatter
2 years ago by snsvrno
Configurable Obsidian plugin that hides parent tags.
Tag Tactician
a year ago by Scott Tomaszewski
Folder by tags distributor
2 years ago by RevoTale
Automatically group Obsidian notes into folder by tags specified in note.
Advanced Сanvas Filter
2 years ago by CHex0K
Tagvis
a year ago by Mason Bryant
Template Filename
a year ago by Callum Alpass
Obsidian plugin for creating notes with templatable filenames
Tag Links
2 years ago by Zacchary Dempsey-Plante
A plugin for Obsidian that allows tags to be opened as links using a hotkey.
Emoji selector
7 months ago by summer
Insert custom emojis with quick search, auto-suggestions, and customizable templates.
LongtimeDiary
2 months ago by sawamaru
Show past Daily notes on the same day in previous years.
Template by Note Name
a year ago by Jacob Learned
A simple Obsidian plugin to automatically template notes based on their title
Fuzzy Note Creator
2 years ago by HaloGamer33
An Obisidan plugin for quickly creating notes with the help of a fuzzy finder. Now with templates!
Current File Tags
a year ago by Trung Tran
Varinote
a year ago by Giorgos Sarigiannidis
A plugin for Obsidian that allows you to add variables in Templates and set their values during the Note creation.
Private Mode
a year ago by markusmo3
Auto Close Tags
9 months ago by k0src
Obsidian MD plugin to auto-close HTML tags.
Custom Comments
8 months ago by Jack Chronicle
Adds a method to create custom methods to enclose comments
Simple Vault Importer
10 months ago by WebInspectInc
Note Reviewer
2 years ago by Travis Linkey
An obsidian plugin to help review notes that have been taken
Note From Form
a year ago by Sergei Kosivchenko
Obsidian plugin that adds support to define input form and generate notes based on it
Daily Notes Automater
a year ago by David Pedrero
Tag Timer
4 months ago by quantavil
The Tag Timer is a versatile plugin for Obsidian that allows you to seamlessly track the time you spend on specific tasks or sections within your notes.
Pug Templates
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables the usage of Pug templates.
Handlebars Dynamic Templating
3 months ago by Hide_D
Handlebars dynamic templating. Define template files and use them dynamically via hb blocks. Template recursion is also possible.
SafeLearn Formatter
8 months ago by UnterrainerInformatik
A community plugin for Obsidian, that offers visual aids for the SafeLearn-specific tags.