Merge pull request #43 from maxheld83/link-post
Link posts / Linklog (john gruber style, similar to hpstr)
This commit is contained in:
commit
bcf509c352
3 changed files with 27 additions and 3 deletions
|
@ -47,8 +47,14 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
<article>
|
<article>
|
||||||
|
{% 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>
|
<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>
|
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
|
||||||
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div><!-- /#index -->
|
</div><!-- /#index -->
|
||||||
|
|
|
@ -36,7 +36,11 @@
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<div class="headline-wrap">
|
<div class="headline-wrap">
|
||||||
<h1>{{ page.title }}</h1>
|
{% if page.link %}
|
||||||
|
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
|
||||||
|
{% else %}
|
||||||
|
<h1><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }}">{{ page.title }}</a></h1>
|
||||||
|
{% endif %}
|
||||||
</div><!--/ .headline-wrap -->
|
</div><!--/ .headline-wrap -->
|
||||||
<div class="article-wrap">
|
<div class="article-wrap">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
14
_posts/2013-08-12-sample-link-post.md
Normal file
14
_posts/2013-08-12-sample-link-post.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "Sample Link Post"
|
||||||
|
description: "Example and code for using link posts."
|
||||||
|
tags: [sample post, link post]
|
||||||
|
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.
|
||||||
|
|
||||||
|
> And this is how a quote looks.
|
||||||
|
|
||||||
|
Some [link](http://www.mademistakes.com) can also be shown.
|
Loading…
Reference in a new issue