Which pandoc is Hugo using?

Hello,

I am using pandoc to create markdown in ”pandoc flavour” and then have this in my config.toml :

[markup]
  defaultMarkdownHandler = "pandoc"

Telling Hugo to use pandoc for converting the markdown to HTML.

This works locally. But when Netlify builds the site there are strange artefacts on the pages when it comes to underlined text. Underline text is marked up like so in the markdown files:

some [underlined]{.ul} text

My local Hugo site is built correctly, but the Netlify built one displays this as some [underlined]{.ul} text.

I tried adding brew "pandoc” to the Brewfile.netlify file. And in my build script I run pandoc -v to verify. It reports the same pandoc version as I have in development, 2.13. The relevant part of the log looks like so;

4:24:25 PM: $ ./build.sh
4:24:25 PM: pandoc 2.13
4:24:25 PM: Compiled with pandoc-types 1.22, texmath 0.12.2, skylighting 0.10.5,
4:24:25 PM: citeproc 0.3.0.9, ipynb 0.1.0.1
4:24:25 PM: User data directory: /opt/buildhome/.local/share/pandoc
4:24:25 PM: Copyright (C) 2006-2021 John MacFarlane. Web:  https://pandoc.org
4:24:25 PM: This is free software; see the source for copying conditions. There is no
4:24:25 PM: warranty, not even for merchantability or fitness for a particular purpose.
4:24:26 PM: Building sites …
4:24:26 PM:                    | EN
4:24:26 PM: +------------------+-----+
4:24:26 PM:   Pages            |  32
4:24:26 PM:   Paginator pages  |   0
4:24:26 PM:   Non-page files   | 185
4:24:26 PM:   Static files     |   4
4:24:26 PM:   Processed images |   0
4:24:26 PM:   Aliases          |   0
4:24:26 PM:   Sitemaps         |   0
4:24:26 PM:   Cleaned          |   0
4:24:26 PM: Total in 165 ms

Now I am thinking that maybe Hugo uses some other pandoc version when it builds the pages?

Have you specified the HUGO_VERSION environment variable to use 0.83.1?

2 Likes

No, I hadn’t. Yes, that worked! Thanks! :heart:

1 Like