1
0
Fork 0

Link post support

This commit is contained in:
Daniel Kempkens 2014-12-29 22:15:43 +01:00
parent a90d783831
commit 188889b96c
5 changed files with 42 additions and 7 deletions

12
_layouts/link.html Normal file
View file

@ -0,0 +1,12 @@
---
layout: default
---
<div class="post">
<h1 class="post-title">{{ page.title }}</h1>
<span class="post-date">{{ page.date | date_to_string }}</span>
<p>&#9875; <a href="{{ page.link }}" rel="external">{{ page.link }}</a></p>
{{ content }}
</div>

View file

@ -16,5 +16,11 @@ title: Post Archive
<ul>
{% endif %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
<li>
{% if post.category == "links" %}
&#9875; <a href="{{ post.link }}" rel="external">{{ post.title }}</a>
{% else %}
<a href="{{ post.url }}">{{ post.title }}</a>
{% endif %}
</li>
{% endfor %}

View file

@ -14,7 +14,7 @@ layout: null
<email>{{ site.author.email }}</email>
</author>
{% for post in site.posts %}
{% for post in site.categories['posts'] %}
<entry>
<id>{{ site.url }}{{ post.id }}</id>
<title>{{ post.title }}</title>

View file

@ -7,14 +7,24 @@ title: Home
{% for post in paginator.posts %}
<div class="post">
<h1 class="post-title">
<a href="{{ post.url }}">
{{ post.title }}
</a>
{% if post.category == "links" %}
&#9875; <a href="{{ post.link }}" rel="external">{{ post.title }}</a>
{% else %}
<a href="{{ post.url }}">{{ post.title }}</a>
{% endif %}
</h1>
<span class="post-date">{{ post.date | date_to_string }}</span>
<span class="post-date">
{{ post.date | date_to_string }}
&middot;
<a href="{{ post.url }}">&#8734;</a>
</span>
{{ post.excerpt }}
{% if post.category == "links" %}
{{ post.content }}
{% else %}
{{ post.excerpt }}
{% endif %}
</div>
{% endfor %}
</div>

View file

@ -351,6 +351,13 @@ tbody tr:nth-child(odd) th {
margin-bottom: 1rem;
color: #9a9a9a;
}
.post-date a {
color: #9a9a9a;
}
.post-date a:hover {
color: #000;
text-decoration: none;
}
/* Related posts */
.related {