Render some files using pandoc

Hi, Im a newbie.
I would like to have some files rendered via pandoc. (pandoc -s -t slidy). So this files should be rendered as slides in Hugo.
Setting defaultmarkdownhandler is not the way to go, as I would like to have only some files rendered by pandoc. Is there a way to i.e. render all .pan files using pandoc -s -t slidy?

By default, files with the .pandoc or .pdc extension are rendered by pandoc, assuming:

  1. The pandoc executable in somewhere in your PATH
  2. The string pandoc is in the security.exec.allow configuration key (see docs)

On a file by file basis, you can force pandoc to render the file (regardless of file extension) by placing this in front matter:

markup = 'pandoc'

How do I tell Hugo to use pandoc -s -t slidy for pdc?

I put

markup: 'pandoc -s -t slidy'
title: 'markup2'

Afaik it is ignored. Setting verbose and debug gives me no information about any pandoc used.

$ ./hugo version
hugo v0.109.0+extended linux/amd64 BuildDate=unknown

The markup key is not for a command. It indicates the type of markup to be rendered.

When Hugo calls pandoc to render the content to HTML, it passes the --mathjax flag, and nothing else. This is not configurable. So yes, you can render with pandoc, but not to the slidy format.