mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #995 from karlcow/master
Fixing documentation according to Issue #362.
This commit is contained in:
commit
6d32fb2bb7
1 changed files with 5 additions and 1 deletions
|
|
@ -90,12 +90,16 @@ For reStructuredText, this metadata should of course be prefixed with a colon::
|
||||||
|
|
||||||
:Modified: 2012-08-08
|
:Modified: 2012-08-08
|
||||||
|
|
||||||
This metadata can then be accessed in the template::
|
This metadata can then be accessed in templates such as ``article.html`` via::
|
||||||
|
|
||||||
{% if article.modified %}
|
{% if article.modified %}
|
||||||
Last modified: {{ article.modified }}
|
Last modified: {{ article.modified }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
If you want to include metadata in templates outside the article context (e.g., ``base.html``), the ``if`` statement should instead be:
|
||||||
|
|
||||||
|
{% if article and article.modified %}
|
||||||
|
|
||||||
How do I assign custom templates on a per-page basis?
|
How do I assign custom templates on a per-page basis?
|
||||||
=====================================================
|
=====================================================
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue