Quotidian Quest

Creation Challenge: Enable linked-list post

Category: misc
#misc #creation challenge

The first thing that I'd like to work on is getting the article header that I'm using to be more capable of handing meta data for individual entries. Currently, it points to the specific url for the article but I'd like it to take my current header.

title: Where to put the maybe-someday  
date: 2016-09-05 22:10:08  
category: personal  
tags: tech, notes, evernote  
status: published    

and add the link attribute

title: Where to put the maybe-someday  
date: 2016-09-05 22:10:08  
category: personal  
tags: tech, notes, evernote  
status: published    
link: some_other_place.com

I started off with the following jinja heading.

<h1>
<a rel="bookmark"
   href="{{ article.url }}"
   title="{{ article.title|striptags }} «{{ SITENAME }}»">
   {{ article.title}}
</a>
</h1>

To be honest, I don't do development on the blog that often so I used my own code to look up how to do an if statement in jinja and wrote a little test line to see if it worked.

{{ article.title}} {% if article.link %} {{ article.link}} {% endif %}

After editing the page a number of times and doing more research that I should have into which kind of rel tag I should use for book marks versus external links, I finished up with this.

{% if article.link %}
<a rel="external"
   title="{{ article.title|striptags }} «{{ SITENAME }}»"
   href="{{ article.link }}">
   {{ article.title}}
</a>
{% else %}
<a rel="bookmark"
   title="{{ article.title|striptags }} «{{ SITENAME }}»"
   href="{{ article.url }}">
   {{ article.title}}
</a>
{% endif %}