Skip to content

Commit

Permalink
Merge pull request duilio#53 from cyrozap/master
Browse files Browse the repository at this point in the history
Add some fixes and FeedBurner integration
  • Loading branch information
duilio committed Jul 13, 2014
2 parents 11a4fc7 + adf6fd9 commit bd5468f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ QR Code generation

- ``QR_CODE``: set to true to enable the qr code generation for articles and pages by browser

FeedBurner integration
----------------------

- ``FEED_FEEDBURNER``: set this to the part of your FeedBurner URL after the ``http://feeds.feedburner.com/`` to set the
displayed feed URL to your FeedBurner URL. This also disables generation of the RSS and ATOM tags, regardless of whether
you've set the ``FEED_RSS`` or ``FEED_ATOM`` variables. This way, you can arbitrarily set your generated feed URL while
presenting your FeedBurner URL to your users.

Contribute
----------

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

{% 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 %}
{% else %}
<div class="entry-content">{{ article.content }}</div>
{% endif %}
4 changes: 4 additions & 0 deletions templates/_includes/navigation.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<ul class="subscription" data-subscription="rss">
{% if FEED_FEEDBURNER %}
<li><a href="http://feeds.feedburner.com/{{ FEED_FEEDBURNER }}" rel="subscribe-rss">RSS</a></li>
{% else %}
{% if FEED_ATOM %}
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" rel="subscribe-atom">Atom</a></li>
{% endif %}
{% if FEED_RSS %}
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" rel="subscribe-rss">RSS</a></li>
{% endif %}
{% endif %}
</ul>


Expand Down
4 changes: 2 additions & 2 deletions templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ <h2>{{ year }}</h2>
{% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
{% for article in articles %}
<article>
<h1><a href="{{ article.url }}">{{ article.title }}</a></h1>
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
<time datetime="{{ article.date }}" pubdate>
<span class="month">{{ article.date.strftime('%B')[:3] }}</span>
<span class="day">{{ article.date.strftime('%d') }}</span>
<span class="year">{{ article.date.strftime('%Y') }}</span>
</time>
<footer>
<span class="categories">posted in
<a class='category' href='{{ SITEROOT }}/{{ article.category.url }}'>{{ article.category }}</a>
<a class='category' href='{{ SITEURL }}/{{ article.category.url }}'>{{ article.category }}</a>
{{ tag }}
</span>
</footer>
Expand Down
5 changes: 5 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
<meta name="author" content="{{ AUTHOR }}">

{% if FEED_FEEDBURNER %}
<link href="http://feeds.feedburner.com/{{ FEED_FEEDBURNER }}" type="application/rss+xml" rel="alternate"
title="{{ SITENAME }} RSS Feed" />
{% else %}
{% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} Atom Feed" />
Expand All @@ -15,6 +19,7 @@
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate"
title="{{ SITENAME }} RSS Feed" />
{% endif %}
{% endif %}

{% if EXTRA_HEADER %}
{{ EXTRA_HEADER }}
Expand Down

0 comments on commit bd5468f

Please sign in to comment.