chiark / gitweb /
theme: make use of article.modified property.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 6 Nov 2017 17:09:13 +0000 (18:09 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 6 Nov 2017 17:10:49 +0000 (18:10 +0100)
doc/pelican/theme.rst
pelican-theme/templates/article.html
pelican-theme/templates/article_footer.html

index 487913d58c6d79d4462e66d0e16404fe6a07a14e..26fc0d2b39a0fcb7332d0cdb1e14c8affb17021b 100644 (file)
@@ -409,8 +409,9 @@ social links:
 Compared to pages, articles have additional metadata like :rst:`:date:`,
 :rst:`:author:`, :rst:`:category:` and :rst:`tags` that order them and divide
 them into various sections. Besides that, there's article :rst:`:summary:`,
-that, unlike with pages, is displayed at the top of the article, along with
-other metadata.
+that, unlike with pages, is displayed in the article header; other metadata are
+displayed in article footer. The article can also optionally have a
+:rst:`:modified:` date, which is shown as date of last update in the footer.
 
 All article listing pages (archives, categories, tags, authors) are displaying
 just the article summary and the full article content is available only on the
index 563f56a737b4bda550934f08010712c33fb25e81..febc2d2e5fbe1ca62dbab8ee91066912035391f1 100644 (file)
@@ -69,7 +69,7 @@
     <footer class="m-container">
       <div class="m-row">
         <div class="m-col-m-10 m-push-m-1 m-nopadb">
-          <p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
+          <p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>{% if article.modified %}; <span class="m-text m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
         </div>
       </div>
     </footer>
index 0b31bef767b6c1731a1ce12398c2237f73800774..3b1092066ba6eebef9e86641cd57c3bd805c51e1 100644 (file)
@@ -1,3 +1,3 @@
 <footer>
-  <p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
+  <p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>{% if article.modified %}; <span class="m-text m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
 </footer>