Przeglądaj źródła

Update code to read include files from _includes folder

Close #60
Talha Mansoor 11 lat temu
rodzic
commit
7acc69b318

+ 5 - 5
templates/article.html

@@ -38,7 +38,7 @@
             {% endif %}
 
             {{ article.content }}
-            {% from 'comments.html' import comments with context %}
+            {% from '_includes/comments.html' import comments with context %}
             {{ comments(article) }}
             <hr/>
             {% if article.prev_article or article.next_article %}
@@ -75,7 +75,7 @@
             {% set day = article.date.strftime('%d')|int %}
             <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b') }} {{ day }} {{- article.date.strftime(', %Y') }}</time>
             {% endif %}
-            {% include 'last_updated.html' %}
+            {% include '_includes/last_updated.html' %}
             {% if article.category|trim|count > 0 %}
             <h4>Category</h4>
             <a class="category-link" href="{{ SITEURL }}/categories.html#{{ category.slug }}-ref">{{ article.category }}</a>
@@ -91,8 +91,8 @@
                 {% endfor %}
             </ul>
             {% endif %}
-            {% include 'social_links.html' %}
-            {% include 'mailchimp.html' %}
+            {% include '_includes/social_links.html' %}
+            {% include '_includes/mailchimp.html' %}
         </div>
         </section>
 </div>
@@ -101,6 +101,6 @@
 
 {% block script %}
     {{ super() }}
-    {% from 'comments.html' import comments_script with context %}
+    {% from '_includes/comments.html' import comments_script with context %}
     {{ comments_script(article) }}
 {% endblock script %}

+ 6 - 6
templates/base.html

@@ -14,7 +14,7 @@
         <meta name="author" content="{{ AUTHOR }}" />
         <meta name="copyright" content="{{ AUTHOR }}" />
         {% endif %}
-        {% include 'latex.html' %}
+        {% include '_includes/latex.html' %}
 
         {% if SITE_DESCRIPTION %}
         <meta name="description" content="{% block head_description %}{{ SITE_DESCRIPTION }}{% endblock head_description %}" />
@@ -30,11 +30,11 @@
         <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/custom.css" media="screen">
         {% endif %}
         {% endblock head_links %}
-        {% include 'favicon_links.html' %}
+        {% include '_includes/favicon_links.html' %}
         {% block feed_links %}
-        {% include 'feeds.html' %}
+        {% include '_includes/feeds.html' %}
         {% endblock feed_links %}
-        {% include 'analytics.html' %}
+        {% include '_includes/analytics.html' %}
     </head>
     <body>
         <div id="content-sans-footer">
@@ -75,7 +75,7 @@
             </div>
         </div>
     </div>
-        {% include 'footer.html' %}
+        {% include '_includes/footer.html' %}
         {% block script %}
         <script src="http://code.jquery.com/jquery.min.js"></script>
         <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
@@ -86,6 +86,6 @@
             }
         </script>
         {% endblock script %}
-        {% include 'stat_counter.html' %}
+        {% include '_includes/stat_counter.html' %}
     </body>
 </html>

+ 1 - 1
templates/categories.html

@@ -10,7 +10,7 @@ All categories of the {{ SITENAME|striptags }} blog.
 
 {% block feed_links %}
 {{ super() }}
-{% include 'feeds_categories.html' %}
+{% include '_includes/feeds_categories.html' %}
 {% endblock feed_links %}
 
 {% block content %}

+ 4 - 4
templates/page.html

@@ -38,13 +38,13 @@
             {% endif %}
 
             {{ page.content }}
-            {% from 'comments.html' import comments with context %}
+            {% from '_includes/comments.html' import comments with context %}
             {{ comments(page) }}
         </div>
         <section>
         <div class="span2" style="float:right;font-size:0.9em;">
-            {% include 'social_links.html' %}
-            {% include 'mailchimp.html' %}
+            {% include '_includes/social_links.html' %}
+            {% include '_includes/mailchimp.html' %}
         </div>
         </section>
     </div>
@@ -53,6 +53,6 @@
 
     {% block script %}
     {{ super() }}
-    {% from 'comments.html' import comments_script with context %}
+    {% from '_includes/comments.html' import comments_script with context %}
     {{ comments_script(page) }}
     {% endblock script %}

+ 1 - 1
templates/tags.html

@@ -10,7 +10,7 @@ All tags used in the {{ SITENAME|striptags }} blog.
 
 {% block feed_links %}
 {{ super() }}
-{% include 'feeds_tags.html' %}
+{% include '_includes/feeds_tags.html' %}
 {% endblock feed_links %}
 
 {% block content %}