18 lines
446 B
Markdown
18 lines
446 B
Markdown
<%*
|
|
const title = await tp.system.prompt("Note title");
|
|
if (!title) { return; }
|
|
const slug = title.toLowerCase().replace(/[^a-z0-9\s-]/g, '').trim().replace(/\s+/g, '-');
|
|
const publishDate = tp.date.now("YYYY-MM-DD");
|
|
await tp.file.move(`content/notes/${tp.date.now("YYYY/MM/DD")}/${slug}`);
|
|
tR += `---
|
|
title: "${title}"
|
|
publishDate: ${publishDate}
|
|
description: ""
|
|
cover: "./${slug}.jpg"
|
|
coverAlt: ""
|
|
tags: []
|
|
draft: false
|
|
syndication:
|
|
---
|
|
`;
|
|
%>
|