include link posts in post index, with external url, timestamp

This commit is contained in:
Maximilian Held 2014-03-25 18:55:34 +01:00
parent b7bbf27ead
commit 7b17dc35b6
2 changed files with 13 additions and 3 deletions

View file

@ -47,8 +47,14 @@
{% endif %}
{% endunless %}
<article>
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
{% if post.link %}
<h4><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }}</a></h4>
<p><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.date | date: "%B %d %H:%M %Z"}}</p>
<p>{{ post.content }}</p>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->

View file

@ -7,4 +7,8 @@ link: http://mademistakes.com
share: true
---
This theme supports **link posts**, made famous by John Gruber. To use, just add `link: http://url-you-want-linked` to the post's YAML front matter and you're done.
This theme supports **link posts**, made famous by John Gruber. To use, just add `link: http://url-you-want-linked` to the post's YAML front matter and you're done.
> And this is how a quote looks.
Some [link](http://www.mademistakes.com) can also be shown.