From 79b10a7c6a2ee5981b563d8ba733a6a8e44d01cb Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 4 Aug 2022 11:44:22 +0200 Subject: 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 --- docs/source/conf.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'docs') 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 ----------------------------------------------------- -- cgit v1.2.3-54-g00ecf