I have a markdown file in Hexo with the following in the front matter:
---
title: something blog post
tags:
- local
- world
categories:
- news
date: 2016-07-27 15:08:51
twitter: twittername
facebook:
---
I have added two test variables (twitter and facebook) but is there a way to not output the content from the variable if the variable has not been set?
This is what is outputted from the HTML:
<ul id="social-links">
<li class="twitter"><a href="http://twitter.com/twittername" target="_blank">twittername</a></li>
<li class="facebook"><a href="http://facebook.com/" target="_blank"></a></li>
</ul>
Since the facebook variable was not filled you see nothing, this is breaking my layout since some posts will not have facebook or twitter and so on.
Thanks in advance