1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 01:46:51 +01:00

display related posts under each post & link

This commit is contained in:
Matthias Kretschmann 2014-07-05 12:59:35 +02:00
parent 5c8d0c5884
commit 1ad1b7fe28
4 changed files with 21 additions and 16 deletions

View File

@ -6,6 +6,7 @@ gem 'jekyll', '1.5.1'
gem 'mini_magick', '>=3.6.0'
gem 'fileutils', '>=0.7'
#for faster LSI generation
# for faster LSI generation
# from http://tonyarnold.com/2014/03/27/speeding-up-jekylls-latent-semantic-mapping.html
gem 'narray', :git => "https://github.com/tonyarnold/narray"
gem 'gsl', :git => "https://github.com/tonyarnold/rb-gsl"

View File

@ -1,21 +1,21 @@
{% if site.related_posts.size > 1 %}
<aside class="related-posts">
<h1 class="related-title">Related</h1>
<div class="row">
{% for post in site.posts limit:6 %}
{% for post in site.related_posts limit:6 %}
<article class="related-post col2">
<a href="{{ post.url }}">
<h1 class="post-title">{{ post.title }}</h1>
</a>
</article>
{% endfor %}
</div>
</aside>
{% endif %}

View File

@ -3,7 +3,7 @@ layout: base
---
<section role="main" id="main" class="page-single row">
<article class="hentry format-link">
<header>
<h1 class="entry-title">
@ -21,11 +21,13 @@ layout: base
<a class="permalink-link" href="{{ page.url | append: '/' }}" rel="tooltip" title="Permalink">&#8734;</a>
</p>
</section>
{% include entry_meta.html %}
{% include comments.html %}
{% include relatedposts.html %}
</article>
</section>

View File

@ -3,7 +3,7 @@ layout: base
---
<section role="main" id="main" class="page-single row">
<article class="hentry format-post">
<header>
<h1 class="entry-title">{{ page.title | titlecase }}</h1>
@ -13,14 +13,16 @@ layout: base
{% if page.image %}
{% picture {{ page.image }} class="teaser" %}
{% endif %}
{{ content }}
</section>
{% include entry_meta.html %}
{% include comments.html %}
{% include relatedposts.html %}
</article>
</section>