I found a solution to this, but I don’t know how to implement it. Apparently obsidian has provided no way of doing what pretty much ever other note taking app in history has done: create a title based on the first line of text in a note.
Apparently I’m supposed to download the “templater” plugin, and then create a template using the following code:
<%*
let title = tp.file.title
if (title.startsWith("Untitled")) {
title = await tp.system.prompt("Title");
await tp.file.rename(`${title}`);
}
tR += "---"
%>
tags: Note <%tp.file.creation_date("YYYY")%>
---
# <%* tR += `${title}` %>
<% tp.file.cursor() %>
___
## References:
-
---
creation date:: [[<%tp.file.creation_date("YYYY-MM-DD")%>]] <%tp.file.creation_date("HH:mm")%>
I downloaded the templater plugin, but I have no idea where to put this code to create a template that will automatically set all new note titles to the first line of text in the note.
Can someone please help me with this?
Thanks,
Adam