Probably projvar genrated vars can be useful for the content, and maybe a pdsite extension, or a pandoc filter can do the inserting.