mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-11-12 04:15:04 -05:00
now only excerpted articles show the "read on" link. Also the text for that link can be set in the _config.yml
This commit is contained in:
parent
178a198ea7
commit
596ec87c37
@ -12,9 +12,12 @@
|
|||||||
{% endunless %}
|
{% endunless %}
|
||||||
{% if index %}
|
{% if index %}
|
||||||
<div class="entry-content">{{ content | excerpt }}</div>
|
<div class="entry-content">{{ content | excerpt }}</div>
|
||||||
<footer>
|
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
|
||||||
<a rel="full-article" href="{{ root_url }}{{ post.url }}">Read on →</a>
|
{% if excerpted == 'true' %}
|
||||||
</footer>
|
<footer>
|
||||||
|
<a rel="full-article" href="{{ root_url }}{{ post.url }}">Read on →</a>
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="entry-content">{{ content }}</div>
|
<div class="entry-content">{{ content }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -32,6 +32,7 @@ pygments: false # default python pygments have been replaced by pygments.rb
|
|||||||
paginate: 10 # Posts per page on the blog index
|
paginate: 10 # Posts per page on the blog index
|
||||||
pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/
|
pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/
|
||||||
recent_posts: 5 # Posts in the sidebar Recent Posts section
|
recent_posts: 5 # Posts in the sidebar Recent Posts section
|
||||||
|
excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles
|
||||||
|
|
||||||
# list each of the sidebar modules you want to include, in the order you want them to appear.
|
# list each of the sidebar modules you want to include, in the order you want them to appear.
|
||||||
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
|
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
|
||||||
|
@ -12,6 +12,11 @@ module OctopressFilters
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Checks for excerpts (helpful for template conditionals)
|
||||||
|
def has_excerpt(input)
|
||||||
|
input =~ /<!--\s*more\s*-->/i ? true : false
|
||||||
|
end
|
||||||
|
|
||||||
# Summary is used on the Archive pages to return the first block of content from a post.
|
# Summary is used on the Archive pages to return the first block of content from a post.
|
||||||
def summary(input)
|
def summary(input)
|
||||||
if input.index(/\n\n/)
|
if input.index(/\n\n/)
|
||||||
|
Loading…
Reference in New Issue
Block a user