Skip to content

Commit

Permalink
chore(docs): auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored and github-actions[bot] committed Feb 9, 2024
1 parent f6e3e65 commit 649e559
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/obsidian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,21 @@ 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
for k, v in pairs(note.metadata) do
out[k] = v
end
end

return out
end,

Expand Down

0 comments on commit 649e559

Please sign in to comment.