Link post support
This commit is contained in:
parent
a90d783831
commit
188889b96c
5 changed files with 42 additions and 7 deletions
12
_layouts/link.html
Normal file
12
_layouts/link.html
Normal 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>⚓ <a href="{{ page.link }}" rel="external">{{ page.link }}</a></p>
|
||||
|
||||
{{ content }}
|
||||
</div>
|
|
@ -16,5 +16,11 @@ title: Post Archive
|
|||
<ul>
|
||||
{% endif %}
|
||||
|
||||
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
|
||||
<li>
|
||||
{% if post.category == "links" %}
|
||||
⚓ <a href="{{ post.link }}" rel="external">{{ post.title }}</a>
|
||||
{% else %}
|
||||
<a href="{{ post.url }}">{{ post.title }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
2
feed.xml
2
feed.xml
|
@ -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>
|
||||
|
|
18
index.html
18
index.html
|
@ -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" %}
|
||||
⚓ <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 }}
|
||||
·
|
||||
<a href="{{ post.url }}">∞</a>
|
||||
</span>
|
||||
|
||||
{% if post.category == "links" %}
|
||||
{{ post.content }}
|
||||
{% else %}
|
||||
{{ post.excerpt }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue