Add Lua filter for title string
This commit is contained in:
parent
40a96a81a7
commit
b4c4074e49
4 changed files with 22 additions and 11 deletions
15
posts/filters/title.lua
Executable file
15
posts/filters/title.lua
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue