From d78714ff135d4fe02d7d6f894ce6b741fe867c96 Mon Sep 17 00:00:00 2001 From: Nicolas Lenz Date: Tue, 30 Oct 2018 15:34:12 +0100 Subject: [PATCH] Pass link prefixes to external markup parsers (#5201) * Pass environment variables for URL prefixes to external markup parser Signed-off-by: Nicolas Lenz * Document external markup link prefix environment variables Signed-off-by: Nicolas Lenz * Run format on link prefix changes Signed-off-by: Nicolas Lenz --- doc/advanced/config-cheat-sheet.en-us.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/advanced/config-cheat-sheet.en-us.md b/doc/advanced/config-cheat-sheet.en-us.md index 4dbc4c0d..1c327f60 100644 --- a/doc/advanced/config-cheat-sheet.en-us.md +++ b/doc/advanced/config-cheat-sheet.en-us.md @@ -359,6 +359,10 @@ IS_INPUT_FILE = false - RENDER\_COMMAND: External command to render all matching extensions. - IS\_INPUT\_FILE: **false** Input is not a standard input but a file param followed `RENDER_COMMAND`. +Two special environment variables are passed to the render command: +- `GITEA_PREFIX_SRC`, which contains the current URL prefix in the `src` path tree. To be used as prefix for links. +- `GITEA_PREFIX_RAW`, which contains the current URL prefix in the `raw` path tree. To be used as prefix for image paths. + ## Other (`other`) - `SHOW_FOOTER_BRANDING`: **false**: Show Gitea branding in the footer.