From 05dcb14e8d7f4dd3e04a88418808a2aa65b27d56 Mon Sep 17 00:00:00 2001 From: Mark Stenglein Date: Fri, 3 Dec 2021 03:06:00 +0000 Subject: [PATCH] markup: add jupyter notebook markup language Follows documentation here: - https://docs.gitea.io/en-us/external-renderers/#installing-external-binaries This adds jupyter and configures gitea to use jupyter to render notebook files. --- Dockerfile | 1 + app.ini.template | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 35b5143..cccf2ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ RUN apt-get update && \ apt-get install -y openssh-server git && \ rm -rf /etc/ssh_host_* && \ rm -r /var/cache/apt /var/lib/apt/lists +RUN pip3 install jupyter ADD supervisor/ /etc/supervisor/conf.d/ diff --git a/app.ini.template b/app.ini.template index c59f2a3..9bd32be 100644 --- a/app.ini.template +++ b/app.ini.template @@ -103,3 +103,11 @@ COOKIE_SECURE = true COOKIE_NAME = cloudron_gitea GC_INTERVAL_TIME = 2592000 +[markup.jupyter] +ENABLED = true +FILE_EXTENSIONS = .ipynb +RENDER_COMMAND = "jupyter nbconvert --stdin --stdout --to html --template basic" +IS_INPUT_FILE = false + +[markup.sanitizer.jupyter.img] +ALLOW_DATA_URI_IMAGES = true