diff --git a/.doc_vars.adoc b/.doc_vars.adoc new file mode 100644 index 0000000..b4c7035 --- /dev/null +++ b/.doc_vars.adoc @@ -0,0 +1 @@ +:repo-url: https://git.leserveurdansmongrenier.uk/leo/gitea-asciidoc.git \ No newline at end of file diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..0fd85ed --- /dev/null +++ b/README.adoc @@ -0,0 +1,41 @@ +:source-highlighter: highlight.js + += Gitea Asciidoc + +include::.doc_vars.adoc[] + +Un script python pour permettre le rendu de fichier Asciidoc dans gitea avec le support pour les commandes `+include::+`. + += Utilisation + +Récuperation du script : + +[subs="attributes"] +---- +git clone {repo-url} +---- + +Modification des dossier de récuperation et d'enregistrement : + +.clone_for_markdown.py +[source,python] +---- +# 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" +---- + +Mise à jour de la configuration Gitea : + +.app.ini +[source,diff] +---- +[markup.asciidoc] +ENABLED = true +FILE_EXTENSIONS = .adoc,.asciidoc ++ RENDER_COMMAND = "python3 /var/lib/gitea/gitea-asciidoc-script/clone_for_markdown.py $GITEA_PREFIX_SRC" +- RENDER_COMMAND = "asciidoctor -a showtitle --out-file=- -" +; Input is not a standard input but a file +IS_INPUT_FILE = false +---- \ No newline at end of file