summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-30 18:12:04 +0200
committerGitHub <noreply@github.com>2021-04-30 18:12:04 +0200
commitd6ec38f2eec6c9ac9e11db5cbf949a357fa13f28 (patch)
tree8f824d3f543fd481c7d9a2dd7cf928169c905d10 /docs
parent6013692424f2c600168ab545156d64830198cf85 (diff)
parentb4bbc5210b5676ca76c78dfc14bbae14b201e948 (diff)
downloadpodman-d6ec38f2eec6c9ac9e11db5cbf949a357fa13f28.tar.gz
podman-d6ec38f2eec6c9ac9e11db5cbf949a357fa13f28.tar.bz2
podman-d6ec38f2eec6c9ac9e11db5cbf949a357fa13f28.zip
Merge pull request #10179 from rcowsill/remote-doc-titles
[CI:DOCS] Add titles to remote docs (windows)
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md1
-rwxr-xr-xdocs/remote-docs.sh5
-rw-r--r--docs/use-pagetitle.lua14
3 files changed, 19 insertions, 1 deletions
diff --git a/docs/README.md b/docs/README.md
index 83f5c79a3..a00b8f39c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -26,6 +26,7 @@ link on that page.
| ------------------------------------ | --------------------------- |
| docs/remote-docs.sh | Read the docs/source/markdown files and format for each platform |
| docs/links-to-html.lua | pandoc filter to do aliases for html files |
+| docs/use-pagetitle.lua | pandoc filter to set html document title |
## API Reference
diff --git a/docs/remote-docs.sh b/docs/remote-docs.sh
index 939c7264c..b1682e9cd 100755
--- a/docs/remote-docs.sh
+++ b/docs/remote-docs.sh
@@ -80,7 +80,10 @@ function html_fn() {
local link=$(sed -e 's?.so man1/\(.*\)?\1?' <$dir/links/${file%.md})
markdown=$dir/$link.md
fi
- pandoc --ascii --lua-filter=docs/links-to-html.lua -o $TARGET/${file%%.*}.html $markdown
+ pandoc --ascii --standalone \
+ --lua-filter=docs/links-to-html.lua \
+ --lua-filter=docs/use-pagetitle.lua \
+ -o $TARGET/${file%%.*}.html $markdown
}
# Run 'podman help' (possibly against a subcommand, e.g. 'podman help image')
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