Permalink
Browse files

add support for "read more" in excerpts, configure in _config.yml

  • Loading branch information...
staeiou committed Jul 21, 2017
1 parent d0a0163 commit 14bf751f96a45a9767c31e5bb79f270d2fec0b78
Showing with 5 additions and 3 deletions.
  1. +1 −0 _config.yml
  2. +4 −3 _includes/archive-single.html
View
@@ -17,6 +17,7 @@ repository : "academicpages/academicpages.github.io"
teaser : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png"
breadcrumbs : false # true, false (default)
words_per_minute : 160
read_more : "enabled" # if enabled, adds "Read more" links to excerpts
comments:
provider : # false (default), "disqus", "discourse", "facebook", "google-plus", "staticman", "custom"
disqus:
@@ -46,9 +46,10 @@ <h2 class="archive__item-title" itemprop="headline">
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
{% endif %}
{% if post.excerpt %}
<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify }}
<a href="{{ base_path }}{{ post.url }}" rel="permalink"><strong> Read more</strong></a></p>
{% if post.excerpt and site.read_more != 'enabled' %}
<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify }}</p>
{% elsif post.excerpt and site.read_more == 'enabled' %}
<p class="archive__item-excerpt" itemprop="description"><p>{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}<strong><a href="{{ base_path }}{{ post.url }}" rel="permalink"> Read more</a></strong></p></p>
{% endif %}
{% if post.citation and post.paperurl %}

0 comments on commit 14bf751

Please sign in to comment.