Files
bobbie-pkm/Templates/04 Library Template.md
2026-03-02 17:06:32 +00:00

20 lines
442 B
Markdown

<%*
const fm = tp.frontmatter;
const created = fm.created || tp.file.creation_date("YYYY-MM-DD[T]HH:mm:ss");
const title = fm.title || await tp.system.prompt("Enter title");
const datePart = String(created).substring(0,10);
// Rename the file using the extracted date + current title
await tp.file.rename(`${datePart} ${title}`);
-%>
---
created: <% created %>
up:
- "[[Library]]"
title: <% title %>
source:
author:
published:
topics:
---