Преглед на файлове

Add {{ SITEURL }} to all URL

I do not want to rely on `/article.url` scheme. I think it is better to
add {{ SITEURL }} to it.
Talha Mansoor преди 11 години
родител
ревизия
9eb79df1ec
променени са 4 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 1 1
      templates/archives.html
  2. 3 3
      templates/article.html
  3. 1 1
      templates/categories.html
  4. 1 1
      templates/tags.html

+ 1 - 1
templates/archives.html

@@ -18,7 +18,7 @@ Full archives of {{ SITENAME|striptags }} blog.
     <div class="span8 offset2">
         <ul class="list-all-articles">
             {% for article in dates %}
-            <li><a href="/{{ article.url }}">{{ article.title }}</a>
+            <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
             <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
             </li>
             {% endfor %}

+ 3 - 3
templates/article.html

@@ -13,7 +13,7 @@
 <article>
 <div class="row-fluid">
     <header class="page_header span10 offset2">
-    <h1><a href="/{{ article.url }}"> {{ article.title }} {%if article.subtext %} <small> {{ article.subtext }} </small> {% endif %} </a></h1>
+    <h1><a href="{{ SITEURL }}/{{ article.url }}"> {{ article.title }} {%if article.subtext %} <small> {{ article.subtext }} </small> {% endif %} </a></h1>
     </header>
 </div>
 
@@ -44,10 +44,10 @@
             <nav>
             <ul class="articles_timeline">
                 {% if previous_article %}
-                <li class="previous_article">« <a href="/{{ previous_article.url }}" title="Previous: {{ previous_article.title }}">{{ previous_article.title }}</a></li>
+                <li class="previous_article">« <a href="{{ SITEURL }}/{{ previous_article.url }}" title="Previous: {{ previous_article.title }}">{{ previous_article.title }}</a></li>
                 {% endif %}
                 {% if next_article %}
-                <li class="next_article"><a href="/{{ next_article.url }}" title="Next: {{ next_article.title }}">{{ next_article.title }}</a> »</li>
+                <li class="next_article"><a href="{{ SITEURL }}/{{ next_article.url }}" title="Next: {{ next_article.title }}">{{ next_article.title }}</a> »</li>
                 {% endif %}
             </ul>
             </nav>

+ 1 - 1
templates/categories.html

@@ -30,7 +30,7 @@ All categories of the {{ SITENAME|striptags }} blog.
                     <div class="accordion-inner">
                         <ul class="list-articles-category">
                             {% for article in articles %} 
-                            <li><span><time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time></span> <a href="{{ article.url }}">{{ article.title }}</a></li>
+                            <li><span><time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time></span> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
                             {% endfor %}
                         </ul>
                     </div>

+ 1 - 1
templates/tags.html

@@ -36,7 +36,7 @@ All tags used in the {{ SITENAME|striptags }} blog.
         <h2 id="{{ tag|replace(' ', '-')|e }}-ref" class="tag-title">{{ tag }}</h2>
         <ul class="articles-in-tag">
             {% for article in articles %} 
-            <li><a href="{{ article.url }}">{{ article.title }}</a></li>
+            <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
             {% endfor %}
         </ul>