yamlmarkdownmultimarkdown

add link to YAML in multimarkdown metadata


I'm writing my CV in MMD. I'd like to add a link to my website, twitter account etc in the mmd metadata and then reference that in the pdf, html, latex that is generated from the mmd. Here's an example mmd file.

---
Name: Mark Ruddy  
Website: [myWebsite](http://myWebsite)  
Street: my address here  
City: myCity  
Postcode: xx xxx  
Phone: Tel: 0777777777  
Email: email: me@myaddress.me  
Twitter: Twitter: [@mytwitter](http://twitter...)
Date: March 2, 2015

# Title
[%name]
[%Street]
[%city]
[%postcode]
[%phone]
[%email]
[%website]
[%twitter]

I'm trialling this using Marked2 as my mmd parser. When I parse the mmd [%website] appears as [myWebsite](http://myWebsite) not myWebsite.

I'm pulling my hair out to find a solution. I guess it's simple but...

Any help appreciated

thanks


Solution

  • The documentation specifically states:

    Metadata is processed as plain text, so it should not include MultiMarkdown markup. It is possible to create customized XSLT files that apply certain processing to the metadata value, but this is not the default behavior.

    I recall in one project of mine, I wanted the meta-data to include a Summary which consisted of Markdown. I had to run the document through the Markdown parser. Then I had to get the "summary" key from the meta-data and run that through the Markdown parser separately. I then needed to pass each item separately to my templates for display. I suspect you may need to do something similar to meet your needs.