diff options
Diffstat (limited to 'tools/note.lua')
-rw-r--r-- | tools/note.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/note.lua b/tools/note.lua index 0d3aff3..16acbc8 100644 --- a/tools/note.lua +++ b/tools/note.lua @@ -1,6 +1,16 @@ local stringify = (require 'pandoc.utils').stringify +local meta_tools = require("tools/meta_tools") -local status_map = {"seadling", "budding", "evergreen"} +local status_map = {"seedling", "budding", "evergreen"} + +function Link(link) + if not string.find(link.target, "://") then + local note = meta_tools.get_note(link.target) + return {pandoc.Link(note["title"], "/notes/"..link.target..".html")} + else + return link + end +end function Pandoc(doc) doc.meta["main_class"] = "html-note-page" |