Last active
December 28, 2015 17:59
-
-
Save jsonbecker/7539951 to your computer and use it in GitHub Desktop.
How to modify your `articles.html` and `index.html` template for "Linked List" style posts.
This file contains hidden or 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
<!-- In your content.md meta data include a link attribute like this --> | |
Link: http://www.getpelican.com | |
<!-- In your articles.html template --> | |
{% block content %} | |
{% if article.link %} <!-- checks if article has link as a metadata attribute --> | |
<h1 class="title"><a href='{{ article.link }}' title="Link">{{ article.title }}</a></h1> | |
{% else %} | |
<h1 class="title"> {{ article.title }}</h1> | |
{% endif %} | |
... | |
<!-- In your index.html template, if you display article.content --> | |
{% if article.link %} | |
<h1 class="title"><a href='{{ article.link }}' title="Link">{{ article.title }}</a><a href="{{ SITEURL }}/{{ article.url }}" title ="Permalink for {{ article.title }}">∞</a></h1> | |
<p class=date> {{ article.locale_date }} </p> | |
{% else %} | |
<h1 class="title">{{ article.title }}<a href="{{ SITEURL }}/{{ article.url }}" class=perma>∞</a></h1> | |
<p class=date> {{ article.locale_date }} </p> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note, the RSS feed does not currently support having titles link to external content as is common on Linked List posts elsewhere. See #1162.