From 532001c8511c7e30de87114d5db233328bce1e55 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 8 Aug 2012 10:21:29 -0700 Subject: [PATCH] Add FAQ entry re: arbitrary metadata in templates --- docs/faq.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index dd7428eb..598f8448 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -65,6 +65,20 @@ In case you don't have pip installed, consider installing it via:: $ (sudo) easy_install pip +Can I use arbitrary meta-data in my templates? +============================================== + +Yes. For example, to include a modified date in a Markdown post, one could +include the following at the top of the article: + + Modified: 2012-08-08 + +That meta-data can then be accessed in the template: + + {% if article.modified %} + Last modified: {{ article.full }} + {% endif %} + How do I assign custom templates on a per-page basis? =====================================================