From 0e9d903313ec491ac588b0b04e473e744675748d Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Tue, 17 Jan 2023 22:26:17 -0500 Subject: Fix back linking to actually show links on pages --- tools/note.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools/note.lua') 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" -- cgit v1.2.3