Setting the default Pandoc on xenial to use a newer version installed by me

Dear Folks,

I am working on getting the Pelican site to build successfully.

It is currently failing because the Pandoc version on the Xenial image is not the latest supported by a plugin that I use to convert Pandoc markdown to HTML5.

The plugin looks for the pandoc executable but because I have no way of setting the pandoc command to use the latest version of Pandoc which I download manually the pages and posts of the site fail to build.

Is there a way for me to make pandoc point to my downloaded version. I have tried setting the path variable and alias in my script and even tried using a symbolic link but none of them seem to work.

Do you have any workaround or is there a way to remove the installed pandoc.

Please advise.

Kindly let me know if you need any additional information.

I look forward to hearing from you.

hi there, sorry to be slow to get back to you!

Actually, our build images are both open source - would you mind reviewing issues filed here and filing a new one if nothing is applicable to you?

Thank you for your reply @perry. I got around the issue by installing the version of Pandoc I needed for my plugin by adapting the script given here.

I also modified my plugin to take a non-standard location for the pandoc executable.

Regardless of the images being open-source I was not able to make the Pandoc I downloaded become the default Pandoc on the image after trying several methods and I was wondering if that was even possible.

Ubuntu’s Pandoc is ancient and the method I used above seemed to be the best workaround.

Is Netlify planning to allow users to use pre-built custom docker images or a docker image from docker hub sometime in the future?

Hi @navanitachora! Unfortunately, the fact that the build images are open source doesn’t allow them to be customized for use in our system, and we also don’t have any near-term plans to support arbitrary custom docker images.

However, it does meant that you can:

  • File issues. We check these issues regularly, answer questions when we can, and track feature requests when planning future development. (We’re currently planning the next image version, so your input is valuable!)
  • Add your input to other issues and feature requests. You can find a couple of pandoc-related issues in there already.
  • Possibly submit a PR to update the Pandoc version (set here). If it’s not a breaking change, we might be able to merge it in the current image. (You can file an issue first to ask, if you like.)

In addition, you might be interested in this workaround. We’re currently experimenting with using Homebrew (technically Linuxbrew) in the Xenial build image. You can install the latest available Pandoc version by saving a Brewfile.netlify in your site’s base directory with the line, brew "pandoc". I tested this in a build and pandoc --version returned (Previously, it returned 2.4.)

Hope that helps!


I just opened a pull request to bring the versions of pandoc and wkhtmltopdf (which are from 2018) in the xenial image to current versions: update pandoc and wkhtmltopdf dependencies to most current version by mfenner · Pull Request #535 · netlify/build-image · GitHub

For me using prebuild binaries is the better alternative to

  • using the version that comes with the distribution
  • building from source
  • custom installations in parallel

As these are just incremental version changes I hope merging the pull request is straightforward (I admit I didn’t do extensive testing).

Hi there, @mfenner

Welcome to Netlify Forums! My apologies for the slow response here. I wanted to reach out and let you know that I have shared your message with our team, and we will follow up on this thread once we have more information for you!

hey @mfenner - looks like that PR is working its way through our pretty extensive backlog. It is on the radar and will get reviewed and accepted as time permits!

Thanks @perry. No urgency on my end.

1 Like

@verythorough I am interested in using the experimental feature you have talked about above as it seems to be the best way for me to choose the versions of packages I want to use.

However, I would like to know how stable this feature is because I do not want my website to suddenly stop working. My website is not high traffic but we still do not want it to break.

hey @navanitachora :wave:

i don’t have anything specific to share with you regarding work on this, but if you would like to keep an eye on our work on this, you might take a peek at: