forked from github/pelican
Add FAQ entry re: arbitrary metadata in templates
This commit is contained in:
parent
3bf377fd5f
commit
532001c851
1 changed files with 14 additions and 0 deletions
14
docs/faq.rst
14
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?
|
||||
=====================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue