Add Lua filter for title string

This commit is contained in:
jultty 2024-02-24 15:22:51 -03:00
commit b4c4074e49
4 changed files with 22 additions and 11 deletions

15
posts/filters/title.lua Executable file
View file

@ -0,0 +1,15 @@
-- source: https://stackoverflow.com/a/76048743
local title
function Header(e)
if title then return end
title = pandoc.utils.stringify(e) .. " • jutty.dev"
end
function Meta(e)
if not e.pagetitle then
e.pagetitle = title
return e
end
end