Create a gist now

Instantly share code, notes, and snippets.

@poritsky /article.html Secret forked from connor/jonathan.html
Created Jan 9, 2012

What would you like to do?
help with the article.html file
{% if index %}
<div class="entry-content">{{ content | excerpt }}</div>
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
{% if excerpted == 'true' %}
<footer>
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
</footer>
{% endif %}
{% if post.external-url %}
<div class="entry-content"><a href="{{ root_url }}{{ post.url }}">Permalink</a><!-- add permalink at end of link posts; could be text or glyph -->
</div>
{% endif %}
{% else %}
<div class="entry-content">{{ content }}</div>
{% endif %}
{% if post.external-url %} <!-- this block gets run if the external-url attribute is present -->
<h1 class="entry-title external">
<a href="{{ post.external-url }}"> <!-- NOTE: see that the href is to the post's external-url attribute? that's what's needed for the links to work. -->
<!-- on my site, I include "[link]" here -->
{% if site.titlecase %}
{{ post.title | titlecase }}
{% else %}
{{ post.title }}
{% endif %}
</a>
</h1>
{% else %} <!-- if the external-url attribute is not present, this code gets run -->
<h1 class="entry-title">
<a href="{{ root_url }}{{ post.url }}">
{% if site.titlecase %}
{{ post.title | titlecase }}
{% else %}
{{ post.title }}
{% endif %}
</a>
</h1>
{% endif %}
@poritsky
Owner
poritsky commented Jan 9, 2012

Put an addition on the end of article.html to include permalink on link posts.

@whlteXbread

Thanks for putting this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment