aboutsummaryrefslogtreecommitdiff
path: root/docs/use-pagetitle.lua
diff options
context:
space:
mode:
Diffstat (limited to 'docs/use-pagetitle.lua')
-rw-r--r--docs/use-pagetitle.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/use-pagetitle.lua b/docs/use-pagetitle.lua
new file mode 100644
index 000000000..ebc92641d
--- /dev/null
+++ b/docs/use-pagetitle.lua
@@ -0,0 +1,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