From 649e5592bd85739ca0f9671548200c5578ce40ff Mon Sep 17 00:00:00 2001 From: epwalsh Date: Fri, 9 Feb 2024 18:50:06 +0000 Subject: [PATCH] chore(docs): auto generate docs --- doc/obsidian.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/obsidian.txt b/doc/obsidian.txt index c92bd2694..5069fa37e 100644 --- a/doc/obsidian.txt +++ b/doc/obsidian.txt @@ -399,8 +399,13 @@ carefully and customize it to your needs: -- Optional, alternatively you can customize the frontmatter data. note_frontmatter_func = function(note) - -- This is equivalent to the default frontmatter function. + -- Add the title of the note as an alias. + if note.title then + note:add_alias(note.title) + end + local out = { id = note.id, aliases = note.aliases, tags = note.tags } + -- `note.metadata` contains any manually added fields in the frontmatter. -- So here we just make sure those fields are kept in the frontmatter. if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then @@ -408,6 +413,7 @@ carefully and customize it to your needs: out[k] = v end end + return out end,