-
-
Save poritsky/8dbe389dfe650042f8bd to your computer and use it in GitHub Desktop.
help with the article.html file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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 %} |
Thanks for putting this up.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put an addition on the end of article.html to include permalink on link posts.