Rendering markdown files using pandoc

I want to use Katex to render markdown files, but I think there’s something I’m not getting right. I tried installing pandoc by writting on my host’s terminal:

docker pull pandoc/core

Next, I tried inserting this into the app.ini file located in /data/gitea/conf/:

ENABLED = true
FILE_EXTENSIONS = .md,.markdown
RENDER_COMMAND = pandoc -f markdown -t html --katex

Would someone please tell me what am I missing? I’m admitedly new to Gitea and Docker, please help

The problem here is that you didnt install pandoc really locally; you downloaded a docker image.

Docker is an containerisation framework, i.e. it helps you to secure applications by putting it in “mini virtualmachines”. With docker pull xxx you download these applications from a central place. You need to actually run them with docker run; this is also the command you would need to put into your render command; with a sudo before it because you need to be a priviliged user to control docker (so make sure your gitea user is allowed to use sudo).

As for the docker run command: here is the site of the image you downloaded; it has some documentation about how to use it Docker Hub , but it would be probable easier for you to just install pandoc directly for your gitea user to use: Pandoc - Installing pandoc

Hope I could help :3

1 Like