Skip to content

Commit

Permalink
Add a capture to article include to use external-url
Browse files Browse the repository at this point in the history
  • Loading branch information
druttka committed Apr 9, 2014
1 parent f6ed412 commit 4d0f3a0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .themes/classic/source/_includes/article.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{% unless page.no_header %}
<header>
{% if index %}
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1>
{% capture entryhref %}{% if post.external_url %}{{ post.external_url }}{% else %}{{ root_url}}{{ post.url }}{% endif %}{% endcapture %}
<h1 class="entry-title"><a href="{{ entryhref }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1>
{% else %}
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
{% endif %}
{% unless page.meta == false %}
<p class="meta">
{% include post/date.html %}{{ time }}
{% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %}
| <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread"
data-disqus-identifier="{% if post.meta.disqus_id %}{{ post.meta.disqus_id }}{% else %}{{ site.url }}{{ post.url }}{% endif %}">Comments</a>
| <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread"
data-disqus-identifier="{% if post.meta.disqus_id %}{{ post.meta.disqus_id }}{% else %}{{ site.url }}{{ post.url }}{% endif %}">Comments</a>
{% endif %}
{% if post.external_url %}<a href="{{ root_url }}{{ post.url }}">Permalink</a>{% endif %}
</p>
{% endunless %}
</header>
Expand Down

0 comments on commit 4d0f3a0

Please sign in to comment.