aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-08-04 11:44:22 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-08-04 11:46:54 +0200
commit79b10a7c6a2ee5981b563d8ba733a6a8e44d01cb (patch)
tree006b4bd024fab82b674fe50efcb68d1b6a585e37
parent65fb90165a5e40965f3f672af20f58e4cb2900a8 (diff)
downloadpodman-79b10a7c6a2ee5981b563d8ba733a6a8e44d01cb.tar.gz
podman-79b10a7c6a2ee5981b563d8ba733a6a8e44d01cb.tar.bz2
podman-79b10a7c6a2ee5981b563d8ba733a6a8e44d01cb.zip
readthedocs(sphinx): run the markdown preprocessor
When docs.podman.io is build on readthedocs we have to make sure to generate the markdown pages first. It works locally with sphinx but I have no idea if this works on the readthedocs infra. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
-rw-r--r--docs/source/conf.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 505bcbec7..b58bb3f46 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -15,6 +15,19 @@
# sys.path.insert(0, os.path.abspath('.'))
import re
+import os
+import subprocess
+
+# We have to run the preprocessor to create the actual markdown files from .in files.
+# Do it here so the it can work on readthedocs as well.
+path = os.path.join(os.path.abspath(os.path.dirname(
+ __file__)), "../../hack/markdown-preprocess")
+p = subprocess.Popen(path,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+out, err = p.communicate()
+if p.returncode != 0:
+ raise Exception("failed to run markdown-preprocess", out, err)
+
# -- Project information -----------------------------------------------------