Skip to content

Commit

Permalink
Add INDEX_FULL_CONTENT setting
Browse files Browse the repository at this point in the history
This setting controls whether or not the full post content should be shown on
the index page (False by default).
  • Loading branch information
siddhantgoel committed Jan 28, 2016
1 parent 29020e0 commit fa71451
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ to enable in each respective channel, your post metadata needs to specify:
- ``use_open_graph: true``: For Facebook specific meta tags.
- ``use_twitter_card: true``: For Twitter specific meta tags.

Full Content
------------

Display full post content on the index page.

- ``INDEX_FULL_CONTENT``: ``False``

Contribute
----------

Expand Down
18 changes: 11 additions & 7 deletions templates/_includes/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ <h1 class="entry-title">{{ article.title|striptags }}</h1>
</header>

{% if index %}
<div class="entry-content">{{ article.summary }}</div>
{% if article.summary != article.content %}
<footer>
<a rel="full-article" href="{{ SITEURL }}/{{ article.url }}">Read On &crarr;</a>
</footer>
{% endif %}
{% if INDEX_FULL_CONTENT %}
<div class="entry-content">{{ article.content }}</div>
{% else %}
<div class="entry-content">{{ article.summary }}</div>
{% if article.summary != article.content %}
<footer>
<a rel="full-article" href="{{ SITEURL }}/{{ article.url }}">Read On &crarr;</a>
</footer>
{% endif %}
{% endif %}
{% else %}
<div class="entry-content">{{ article.content }}</div>
<div class="entry-content">{{ article.content }}</div>
{% endif %}

0 comments on commit fa71451

Please sign in to comment.