41 lines
995 B
Plaintext
41 lines
995 B
Plaintext
: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
|
|
---- |