Consider using the templater plugin, where you can assign a shortcut to a specific template.
The template itself may look like this:
<%*
let title = tp.file.title
if (title.startsWith("Untitled") {
title = await tp.system.prompt("Name the note", tp.date.now("YYYY-MM-DD") + " ", true);
await tp.file.rename(`${title}`);
}
const include_file = await tp.system.suggester(
["1. note"
, "2. movie"
, "3. cite"
, "4. moc"
, "5. meeting"
, "6. event"
, "7. person"
, "8. project note"
, "9. project meeting"
, "10. technical documentation"
],
["[[xxx__N2309__xxx]]"
,"[[xxx__Y2301__xxx]]"
,"[[xxx__C2309__xxx]]"
,"[[xxx__M2310__xxx]]"
,"[[xxx__S2303__xxx]]"
,"[[xxx__W2309__xxx]]"
,"[[xxx__OI2301__xxx]]"
,"[[xxx__PT2307__xxx]]"
,"[[xxx__PS2307__xxx]]"
,"[[xxx__D2309__xxx]]"
],false,"Podaj typ notatki"
);
tR+= await tp.file.include(include_file);
%>
The first part of the code renames the file with today’s date filled in, then the defined template is selected and attached to the new file.
My partial template for the note looks like this:
---
<%* const status = await tp.system.suggester(["🟥","🟩","🟧","🟨"],["🟥","🟩","🟧","🟨"], false, "Enter the status of the memo") -%>
<%* const tagSelector1 = await tp.system.suggester(["1. 💼", "2. 🧠", "3. ⚙"],["💼", "🧠", "⚙"], false, "Specify level 1 grouping") -%>
<%* const tagSelector2 = await tp.system.suggester(["📥️","📦"],["📥️","📦"], false, "Specify level 2 grouping") -%>
<%* const tagValuable = await tp.system.suggester(["no assignment","🌱","☘️","🍀","🌿","🌲","🎄"],["","🌱","☘️","🍀","🌿","🌲","🎄"], false, "Value of the note") -%>
version: N2309
typ: note
tags: <% tagSelector1 %>/<% tagSelector2 %>/📝️/<% status %>
status: <% status %>
valuable: <% tagValuable %>
publish: true
created: <% tp.file.creation_date("YYYY-MM-DD HH:mm") %>
updated: <% tp.file.last_modified_date("YYYY-MM-DD HH:mm") %>
reviewed: <% tp.date.now("YYYY-MM-DD") %>
imageNameKey:
aliases:
---
so you can also complete properties if you want.