forked from github/pelican
Adding context to the documentation for metadata
Giving a longer description Thanks to justin mayer for #995
This commit is contained in:
parent
03e9d0182d
commit
6a0d19ef5c
1 changed files with 6 additions and 2 deletions
|
|
@ -90,12 +90,16 @@ For reStructuredText, this metadata should of course be prefixed with a colon::
|
|||
|
||||
: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 and article.modified %}
|
||||
{% if article.modified %}
|
||||
Last modified: {{ article.modified }}
|
||||
{% 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?
|
||||
=====================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue