Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Ruled template

ypetremannypetremann3k downloads

Use templates based on rules when creating a new file.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

This is a plugin for Obsidian (https://obsidian.md).
This is made to be used with plugins like templater.

Description

It permit to automaticaly select a template on file creation based on rules.
In the settings, you can define as many rules as you need.
You define for each rule a pattern (a regex or a glob) and a template to use.
Rules are checked from top to bottom and the first to match is used.
You can reorganise them as you like with convenient sorting arrows and quick deletion.
You can also test rules by typing a path and it will tells you which one matched.
When testing rules, it will tells you if a pattern or a template is invalid.

example

Periodic Notes, Natural Language Dates and templater are awesome plugins but in a complete workflow with automated links, but they don't listen for all journal file to be created, it can get messy to have files formatted one way or another, so a solution is to not define template for them and use Ruled template instead. With these it's possible to check the file name.

pattern template
/\/[0-9]{4}-[0-9]{2}-[0-9]{2}.md/ Templates/Day.md
/\/[0-9]{4}-W[0-9]{2}.md/ Templates/Week.md
/\/[0-9]{4}-[0-9]{2}.md/ Templates/Month.md
/\/[0-9]{4}-Q[0-9].md/ Templates/Quaterly.md
/\/[0-9]{4}.md/ Templates/Year.md
66%
HealthFair
ReviewSatisfactory
About
Select templates automatically for new files based on ordered rules that match file paths. Create rules with regex or glob patterns, reorder or delete them, and test paths to see which template matches and validate patterns and templates.
TemplatingAutomationFiles
Details
Current version
1.1.0
Last updated
3 years ago
Created
3 years ago
Updates
4 releases
Downloads
3k
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
Support
Author
ypetremannypetremann
obsidian-regex-template.ypetremann.com
GitHubypetremann
  1. Community
  2. Plugins
  3. Templating
  4. Ruled template

Related plugins

QuickAdd

Quickly add new notes or content to your vault.

Templater

Create and use dynamic templates.

Advanced URI

Control everything with URI.

Vault Changelog

Maintain a changelog of recently edited notes.

Create Note in Folder

Add commands to create a note in a specific folder.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Local REST API & MCP Server

Unlock your automation needs by interacting with your notes over a secure REST API.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

Recent Files

Display a list of recently opened files.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.