Use object.url to get the url for author, category and tags

This commit is contained in:
Kyle Fuller
2012-05-14 18:17:00 +01:00
parent 2e0d1cae62
commit 9c349d82c6
42 changed files with 74 additions and 74 deletions

View File

@@ -6,10 +6,10 @@
{% if article.author %}
<address class="vcard author">
By <a class="url fn" href="{{ SITEURL }}/author/{{ article.author }}.html">{{ article.author }}</a>
By <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
</address>
{% endif %}
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
<p>In <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
{% include 'taglist.html' %}
{{ translations.translate(article) }}
</footer><!-- /.post-info -->

View File

@@ -38,7 +38,7 @@
{% endfor %}
{% endif %}
{% for cat, null in categories %}
<li {% if cat == category and not article %}class="active"{% endif %}><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
<li {% if cat == category and not article %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
{% for title, link in MENUITEMS %}
<li><a href="{{ SITEURL }}/{{ link }}">{{ title }}</a></li>

View File

@@ -1 +1 @@
{% if DISQUS_SITENAME %}<p>There are <a href="{{ SITEURL }}/{{ article.slug }}.html#disqus_thread">comments</a>.</p>{% endif %}
{% if DISQUS_SITENAME %}<p>There are <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">comments</a>.</p>{% endif %}

View File

@@ -1,2 +1,2 @@
{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</a>{% endfor %}</p>{% endif %}
{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}</p>{% endif %}
{% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>

View File

@@ -5,8 +5,8 @@
<h1 class="entry-title">Tags</h1>
<ul id="cloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/tag/{{
tag.0 }}.html">{{ tag.0 }}</a></li>
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{
tag.0.url }}">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
</section>