mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Implement period_archives common context variable
Also, set default patterns for time-period *_ARCHIVE_URL settings.
This commit is contained in:
parent
1f6b344f7d
commit
5214248344
5 changed files with 256 additions and 70 deletions
|
|
@ -572,33 +572,36 @@ posts for the month at ``posts/2011/Aug/index.html``.
|
|||
This way a reader can remove a portion of your URL and automatically arrive
|
||||
at an appropriate archive of posts, without having to specify a page name.
|
||||
|
||||
.. data:: YEAR_ARCHIVE_URL = ''
|
||||
|
||||
The URL to use for per-year archives of your posts. Used only if you have
|
||||
the ``{url}`` placeholder in ``PAGINATION_PATTERNS``.
|
||||
|
||||
.. data:: YEAR_ARCHIVE_SAVE_AS = ''
|
||||
|
||||
The location to save per-year archives of your posts.
|
||||
|
||||
.. data:: MONTH_ARCHIVE_URL = ''
|
||||
.. data:: YEAR_ARCHIVE_URL = 'posts/{date:%Y}/'
|
||||
|
||||
The URL to use for per-month archives of your posts. Used only if you have
|
||||
the ``{url}`` placeholder in ``PAGINATION_PATTERNS``.
|
||||
The URL to use for per-year archives of your posts. This default value
|
||||
matches a ``YEAR_ARCHIVE_SAVE_AS`` setting of
|
||||
``posts/{date:%Y}/index.html``.
|
||||
|
||||
.. data:: MONTH_ARCHIVE_SAVE_AS = ''
|
||||
|
||||
The location to save per-month archives of your posts.
|
||||
|
||||
.. data:: DAY_ARCHIVE_URL = ''
|
||||
.. data:: MONTH_ARCHIVE_URL = 'posts/{date:%Y}/{date:%b}/'
|
||||
|
||||
The URL to use for per-day archives of your posts. Used only if you have the
|
||||
``{url}`` placeholder in ``PAGINATION_PATTERNS``.
|
||||
The URL to use for per-month archives of your posts. This default value
|
||||
matches a ``MONTH_ARCHIVE_SAVE_AS`` setting of
|
||||
``posts/{date:%Y}/{date:%b}/index.html``.
|
||||
|
||||
.. data:: DAY_ARCHIVE_SAVE_AS = ''
|
||||
|
||||
The location to save per-day archives of your posts.
|
||||
|
||||
.. data:: DAY_ARCHIVE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/'
|
||||
|
||||
The URL to use for per-day archives of your posts. This default value
|
||||
matches a ``DAY_ARCHIVE_SAVE_AS`` setting of
|
||||
``posts/{date:%Y}/{date:%b}/{date:%d}/index.html``.
|
||||
|
||||
``DIRECT_TEMPLATES`` work a bit differently than noted above. Only the
|
||||
``_SAVE_AS`` settings are available, but it is available for any direct
|
||||
template.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue