mszep / pandoc_resume

The Markdown Resume
http://mszep.github.io/pandoc_resume/
MIT License
1.64k stars 759 forks source link

Add reading YAML Metadata block into PDF Metadata #74

Open andi4000 opened 4 years ago

andi4000 commented 4 years ago

if user provides PDF metadata variable e.g. author-meta, title-meta, and keywords in the YAML Metadata block of the Markdown file, it will be used as PDF Metadata.

The variable title-meta will be displayed on the PDF Reader instead of plain "resume" string.

MWE:

---
author-meta: "Donald Duck"
title-meta: "Ducky Duck Duck"
keywords:
    - Duck
    - Ducky
    - Donald
...

Donald Duck
===========

Education
---------

YAML Metadata Block is optional.

mszep commented 4 years ago

I love this, but I think it should be optional, so that the user doesn't have to put YAML in their markdown if they don't want to.

I think pandoc templates allow for conditionals in order to implement this, basically if there is no YAML metadata specified, the default will be the same as before.

mszep commented 4 years ago

In fact a few lines below your proposed changes there are some if statements that show how it can be done!