31 lines
590 B
Markdown
31 lines
590 B
Markdown
|
<%*
|
||
|
let filename = tp.file.title
|
||
|
if ( filename.startsWith("Untitled") ) {
|
||
|
filename = await tp.system.prompt("File name:", tp.date.now("YYYY-MM-DD-HHmm"))
|
||
|
await tp.file.rename(filename)
|
||
|
}
|
||
|
%>---
|
||
|
created_ts: <% tp.date.now("YYYY-MM-DD HH:mm") %>
|
||
|
source: <% await tp.system.prompt("Source") %>
|
||
|
tags:
|
||
|
<%*
|
||
|
let isAddingTags = true;
|
||
|
while (isAddingTags) {
|
||
|
const userTag = await tp.system.prompt("Enter a tag. Leave blank to complete.");
|
||
|
if (userTag) {
|
||
|
-%>
|
||
|
- <% userTag %>
|
||
|
<%*
|
||
|
} else {
|
||
|
isAddingTags = false;
|
||
|
}
|
||
|
}
|
||
|
-%>
|
||
|
---
|
||
|
|
||
|
```table-of-contents
|
||
|
title: **Table of Contents**
|
||
|
```
|
||
|
|
||
|
---
|