mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Clarify docs about the DIRECT_TEMPLATES _SAVE_AS and _URL settings.
This commit is contained in:
parent
fb4b894b77
commit
6264cf8916
2 changed files with 158 additions and 156 deletions
|
|
@ -27,9 +27,9 @@ Here is a list of settings for Pelican:
|
|||
Basic settings
|
||||
==============
|
||||
|
||||
===================================================================== =====================================================================
|
||||
=============================================================================== =====================================================================
|
||||
Setting name (default value) What does it do?
|
||||
===================================================================== =====================================================================
|
||||
=============================================================================== =====================================================================
|
||||
`AUTHOR` Default author (put your name)
|
||||
`DATE_FORMATS` (``{}``) If you manage multiple languages, you can set the date formatting
|
||||
here. See the "Date format and locales" section below for details.
|
||||
|
|
@ -135,7 +135,7 @@ Setting name (default value) What doe
|
|||
incorporated into the generated HTML via the `Typogrify
|
||||
<https://pypi.python.org/pypi/typogrify-web>`_ library,
|
||||
which can be installed via: ``pip install typogrify-web``
|
||||
`DIRECT_TEMPLATES` (``('index', 'tags', 'categories', 'archives')``) List of templates that are used directly to render
|
||||
`DIRECT_TEMPLATES` (``('index', 'tags', 'categories', 'authors', 'archives')``) List of templates that are used directly to render
|
||||
content. Typically direct templates are used to generate
|
||||
index pages for collections of content (e.g., tags and
|
||||
category index pages). If the tag and category collections
|
||||
|
|
@ -162,7 +162,7 @@ Setting name (default value) What doe
|
|||
`PYGMENTS_RST_OPTIONS` (``[]``) A list of default Pygments settings for your reStructuredText
|
||||
code blocks. See :ref:`internal_pygments_options` for a list of
|
||||
supported options.
|
||||
===================================================================== =====================================================================
|
||||
=============================================================================== =====================================================================
|
||||
|
||||
.. [#] Default is the system locale.
|
||||
|
||||
|
|
@ -248,29 +248,15 @@ Setting name (default value) What does it do?
|
|||
use the default language.
|
||||
`PAGE_LANG_SAVE_AS` (``'pages/{slug}-{lang}.html'``) The location we will save the page which doesn't
|
||||
use the default language.
|
||||
`CATEGORIES_URL` (``'categories.html'``) The URL to use for the category list.
|
||||
`CATEGORIES_SAVE_AS` (``'categories.html'``) The location to save the category list.
|
||||
`CATEGORY_URL` (``'category/{slug}.html'``) The URL to use for a category.
|
||||
`CATEGORY_SAVE_AS` (``'category/{slug}.html'``) The location to save a category.
|
||||
`TAG_URL` (``'tag/{slug}.html'``) The URL to use for a tag.
|
||||
`TAG_SAVE_AS` (``'tag/{slug}.html'``) The location to save the tag page.
|
||||
`TAGS_URL` (``'tags.html'``) The URL to use for the tag list.
|
||||
`TAGS_SAVE_AS` (``'tags.html'``) The location to save the tag list.
|
||||
`AUTHOR_URL` (``'author/{slug}.html'``) The URL to use for an author.
|
||||
`AUTHOR_SAVE_AS` (``'author/{slug}.html'``) The location to save an author.
|
||||
`AUTHORS_URL` (``'authors.html'``) The URL to use for the author list.
|
||||
`AUTHORS_SAVE_AS` (``'authors.html'``) The location to save the author list.
|
||||
`<DIRECT_TEMPLATE_NAME>_SAVE_AS` The location to save content generated from direct
|
||||
templates. Where <DIRECT_TEMPLATE_NAME> is the
|
||||
upper case template name.
|
||||
`ARCHIVES_SAVE_AS` (``'archives.html'``) The location to save the article archives page.
|
||||
`ARCHIVES_URL` (``'archives.html'``) The URL to use for the article archives page.
|
||||
`YEAR_ARCHIVE_SAVE_AS` (False) The location to save per-year archives of your
|
||||
posts.
|
||||
`MONTH_ARCHIVE_SAVE_AS` (False) The location to save per-month archives of your
|
||||
posts.
|
||||
`DAY_ARCHIVE_SAVE_AS` (False) The location to save per-day archives of your
|
||||
posts.
|
||||
`YEAR_ARCHIVE_SAVE_AS` (False) The location to save per-year archives of your posts.
|
||||
`MONTH_ARCHIVE_SAVE_AS` (False) The location to save per-month archives of your posts.
|
||||
`DAY_ARCHIVE_SAVE_AS` (False) The location to save per-day archives of your posts.
|
||||
`SLUG_SUBSTITUTIONS` (``()``) Substitutions to make prior to stripping out
|
||||
non-alphanumerics when generating slugs. Specified
|
||||
as a list of 2-tuples of ``(from, to)`` which are
|
||||
|
|
@ -284,6 +270,24 @@ Setting name (default value) What does it do?
|
|||
set the corresponding ``*_SAVE_AS`` setting to ``None`` to prevent the
|
||||
relevant page from being generated.
|
||||
|
||||
`DIRECT_TEMPLATES`
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
These templates (``('index', 'tags', 'categories', 'archives')`` by default)
|
||||
works a bit differently than above. Only the ``_SAVE_AS`` setting is available:
|
||||
|
||||
============================================= ===============================================
|
||||
Setting name (default value) What does it do?
|
||||
============================================= ===============================================
|
||||
`ARCHIVES_SAVE_AS` (``'archives.html'``) The location to save the article archives page.
|
||||
`AUTHORS_SAVE_AS` (``'authors.html'``) The location to save the author list.
|
||||
`CATEGORIES_SAVE_AS` (``'categories.html'``) The location to save the category list.
|
||||
`TAGS_SAVE_AS` (``'tags.html'``) The location to save the tag list.
|
||||
============================================= ===============================================
|
||||
|
||||
The corresponding urls are hard-coded in the themes: ``'archives.html'``,
|
||||
``'authors.html'``, ``'categories.html'``, ``'tags.html'``.
|
||||
|
||||
Timezone
|
||||
--------
|
||||
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@ DEFAULT_CONFIG = {
|
|||
'PDF_GENERATOR': False,
|
||||
'PDF_STYLE_PATH': '',
|
||||
'PDF_STYLE': 'twelvepoint',
|
||||
'CATEGORIES_URL': 'categories.html',
|
||||
'CATEGORIES_SAVE_AS': 'categories.html',
|
||||
'CATEGORY_URL': 'category/{slug}.html',
|
||||
'CATEGORY_SAVE_AS': os.path.join('category', '{slug}.html'),
|
||||
'TAG_URL': 'tag/{slug}.html',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue