mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'master' into switch-to-pytest
This commit is contained in:
commit
26f68e4749
13 changed files with 240 additions and 83 deletions
|
|
@ -847,13 +847,11 @@ can be invoked by passing the ``--archive`` flag).
|
|||
|
||||
The cache files are Python pickles, so they may not be readable by
|
||||
different versions of Python as the pickle format often changes. If
|
||||
such an error is encountered, the cache files have to be rebuilt by
|
||||
removing them and re-running Pelican, or by using the Pelican
|
||||
command-line option ``--ignore-cache``. The cache files also have to
|
||||
be rebuilt when changing the ``GZIP_CACHE`` setting for cache file
|
||||
reading to work properly.
|
||||
such an error is encountered, it is caught and the cache file is
|
||||
rebuilt automatically in the new format. The cache files will also be
|
||||
rebuilt after the ``GZIP_CACHE`` setting has been changed.
|
||||
|
||||
The ``--ignore-cache`` command-line option is also useful when the
|
||||
The ``--ignore-cache`` command-line option is useful when the
|
||||
whole cache needs to be regenerated, such as when making modifications
|
||||
to the settings file that will affect the cached content, or just for
|
||||
debugging purposes. When Pelican runs in autoreload mode, modification
|
||||
|
|
|
|||
102
docs/themes.rst
102
docs/themes.rst
|
|
@ -329,6 +329,108 @@ period_archives.html template
|
|||
<https://github.com/getpelican/pelican/blob/master/pelican/themes/simple/templates/period_archives.html>`_.
|
||||
|
||||
|
||||
Objects
|
||||
=======
|
||||
|
||||
Detail objects attributes that are available and useful in templates. Not all
|
||||
attributes are listed here, this is a selection of attributes considered useful
|
||||
in a template.
|
||||
|
||||
.. _object-article:
|
||||
|
||||
Article
|
||||
-------
|
||||
|
||||
The string representation of an Article is the `source_path` attribute.
|
||||
|
||||
=================== ===================================================
|
||||
Attribute Description
|
||||
=================== ===================================================
|
||||
author The :ref:`Author <object-author_cat_tag>` of
|
||||
this article.
|
||||
authors A list of :ref:`Authors <object-author_cat_tag>`
|
||||
of this article.
|
||||
category The :ref:`Category <object-author_cat_tag>`
|
||||
of this article.
|
||||
content The rendered content of the article.
|
||||
date Datetime object representing the article date.
|
||||
date_format Either default date format or locale date format.
|
||||
default_template Default template name.
|
||||
in_default_lang Boolean representing if the article is written
|
||||
in the default language.
|
||||
lang Language of the article.
|
||||
locale_date Date formated by the `date_format`.
|
||||
metadata Article header metadata `dict`.
|
||||
save_as Location to save the article page.
|
||||
slug Page slug.
|
||||
source_path Full system path of the article source file.
|
||||
status The article status, can be any of 'published' or
|
||||
'draft'.
|
||||
summary Rendered summary content.
|
||||
tags List of :ref:`Tag <object-author_cat_tab>`
|
||||
objects.
|
||||
template Template name to use for rendering.
|
||||
title Title of the article.
|
||||
translations List of translations
|
||||
:ref:`Article <object-article>` objects.
|
||||
url URL to the article page.
|
||||
=================== ===================================================
|
||||
|
||||
.. _object-author_cat_tag:
|
||||
|
||||
Author / Category / Tag
|
||||
-----------------------
|
||||
|
||||
The string representation of those objects is the `name` attribute.
|
||||
|
||||
=================== ===================================================
|
||||
Attribute Description
|
||||
=================== ===================================================
|
||||
name Name of this object [1]_.
|
||||
page_name Author page name.
|
||||
save_as Location to save the author page.
|
||||
slug Page slug.
|
||||
url URL to the author page.
|
||||
=================== ===================================================
|
||||
|
||||
.. [1] for Author object, coming from `:authors:` or `AUTHOR`.
|
||||
|
||||
.. _object-page:
|
||||
|
||||
Page
|
||||
----
|
||||
|
||||
The string representation of a Page is the `source_path` attribute.
|
||||
|
||||
=================== ===================================================
|
||||
Attribute Description
|
||||
=================== ===================================================
|
||||
author The :ref:`Author <object-author_cat_tag>` of
|
||||
this page.
|
||||
content The rendered content of the page.
|
||||
date Datetime object representing the page date.
|
||||
date_format Either default date format or locale date format.
|
||||
default_template Default template name.
|
||||
in_default_lang Boolean representing if the article is written
|
||||
in the default language.
|
||||
lang Language of the article.
|
||||
locale_date Date formated by the `date_format`.
|
||||
metadata Page header metadata `dict`.
|
||||
save_as Location to save the page.
|
||||
slug Page slug.
|
||||
source_path Full system path of the page source file.
|
||||
status The page status, can be any of 'published' or
|
||||
'draft'.
|
||||
summary Rendered summary content.
|
||||
tags List of :ref:`Tag <object-author_cat_tab>`
|
||||
objects.
|
||||
template Template name to use for rendering.
|
||||
title Title of the page.
|
||||
translations List of translations
|
||||
:ref:`Article <object-article>` objects.
|
||||
url URL to the page.
|
||||
=================== ===================================================
|
||||
|
||||
Feeds
|
||||
=====
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue