diff --git a/clone_for_markdown.py b/clone_for_markdown.py index 87f322d..f2219ea 100644 --- a/clone_for_markdown.py +++ b/clone_for_markdown.py @@ -10,7 +10,9 @@ in : a relative path as given by GITEA_PREFIX_SRC (https://docs.gitea.io/en-us/c return : The name of the folder containing the cloned repo """ +# Prefix for the path where repository are saved, can be an url PATH_PREFIX = "/var/lib/gitea/git/repositories" +# Prefix for where we will clone the repos CACHE_FOLDER_PATH = "/var/lib/gitea/markdown_cache" import sys @@ -33,5 +35,4 @@ if not os.path.isdir(CACHE_FOLDER_PATH): if not os.path.isdir(repo_name): subprocess.run(["git", "clone", repo_path, repo_name], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) -subprocess.run(["asciidoctor", "-s", "-a", "showtitle", "--out-file=-", f"--base-dir={repo_name}", "-"]) - +subprocess.run(["asciidoctor", "-a", "showtitle", "-a", "source-highlighter=highlight.js", "--out-file=-", f"--base-dir={repo_name}", "-"])