> I tried to evaluate "git rev-parse HEAD" in a build script and hand over the > result to the build process by setting a custom variable to the hash string > via --variable hash=${git rev-parse HEAD}. In my template I have $hash$ The syntax for including command output in a shell command line is $(cmd), not ${cmd}. ${cmd} expands to the value of the shell variable cmd instead of executing cmd. Your command line should thus look like $ pandoc ... --variable "hash=$(git rev-parse HEAD)" > I stored the hash in a file and tried to include it with -B, though this > would not be a good solution if it worked at all. Do you have $include-before$ somewhere in your template, if not then pandoc doesn't know where to include the contents of the file.