summaryrefslogtreecommitdiffstats
path: root/docs/use-pagetitle.lua
blob: ebc92641d709967d84f936fb84b88edb585ab26a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local List = require("pandoc.List")

function Meta(m)
  -- Use pagetitle instead of title (prevents pandoc inserting a <H1> title)
  m.pagetitle = m.title
  m.title = nil

  if m.pagetitle ~= nil and m.pagetitle.t == "MetaInlines" then
    -- Add suffix to match the Sphinx HTML documentation
    List.extend(m.pagetitle, {pandoc.Str" \u{2014} Podman documentation"})
  end

  return m
end