see also https://pandoc.org/lua-filters.html#replacing-placeholders-with-their-metadata-value

On Thursday, January 10, 2019 at 12:02:42 PM UTC+1, Vang Le Quy wrote:
Thanks for your comment, John. For now I chose to use a bash script which runs a `sed` command before rendering with pandoc, and it works fine.

On Wednesday, January 9, 2019 at 7:33:09 PM UTC+1, Vang Le Quy wrote:

pandoc -v
pandoc
2.3.1
Compiled with pandoc-types 1.17.5.1, texmath 0.11.1.1, skylighting 0.7.3
Default user data directory: /Users/vle/.pandoc
Copyright (C) 2006-2018 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

pandoc -h says that there is `-V` and `--varaible KEY[:VALUE]` flag. I want to include some value at rendering time (document version). So I did this:

pandoc  --variable gitcommit:xxxxxyyy -o markdowndoc.pdf markdowdoc.md

---
title
: Test Variables
output
: pdf_document
header
-includes:
   
- \usepackage{hyperref}
   
- \usepackage{datetime}
   
- \usepackage{fancyhdr}
   
- \pagestyle{fancy}
   
- \fancyhead[LE,LO]{}
   
- \fancyfoot[CO,CE]{Template Version \pdfdate| Git Commit:$gitcommit$}
   
- \fancyfoot[LE,RO]{\thepage}
---

Variable value, gitcommit: $gitcommit$


This however did not result in expected value in the finale PDF document. So is it possible at all to do this kind of thing at the moment?

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/587465b1-8773-4654-8be9-16afe5e42217%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.