mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
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>
This commit is contained in:
@ -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 -----------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user