mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add documentation for DIRECT_TEMPLATES and PAGINATED_DIRECT_TEMPLATES
This commit is contained in:
parent
06ba9acdb8
commit
df7b2c968e
1 changed files with 71 additions and 68 deletions
|
|
@ -21,68 +21,73 @@ Here is a list of settings for Pelican:
|
||||||
Basic settings
|
Basic settings
|
||||||
==============
|
==============
|
||||||
|
|
||||||
================================================ =====================================================
|
===================================================================== =====================================================================
|
||||||
Setting name (default value) What does it do?
|
Setting name (default value) What does it do?
|
||||||
================================================ =====================================================
|
===================================================================== =====================================================================
|
||||||
`AUTHOR` Default author (put your name)
|
`AUTHOR` Default author (put your name)
|
||||||
`DATE_FORMATS` (``{}``) If you do manage multiple languages, you can
|
`DATE_FORMATS` (``{}``) If you do manage multiple languages, you can
|
||||||
set the date formatting here. See "Date format and locales"
|
set the date formatting here. See "Date format and locales"
|
||||||
section below for details.
|
section below for details.
|
||||||
`DEFAULT_CATEGORY` (``'misc'``) The default category to fall back on.
|
`DEFAULT_CATEGORY` (``'misc'``) The default category to fall back on.
|
||||||
`DEFAULT_DATE_FORMAT` (``'%a %d %B %Y'``) The default date format you want to use.
|
`DEFAULT_DATE_FORMAT` (``'%a %d %B %Y'``) The default date format you want to use.
|
||||||
`DISPLAY_PAGES_ON_MENU` (``True``) Whether to display pages on the menu of the
|
`DISPLAY_PAGES_ON_MENU` (``True``) Whether to display pages on the menu of the
|
||||||
template. Templates may or not honor this
|
template. Templates may or not honor this
|
||||||
setting.
|
setting.
|
||||||
`FALLBACK_ON_FS_DATE` (``True``) If True, Pelican will use the file system
|
`FALLBACK_ON_FS_DATE` (``True``) If True, Pelican will use the file system
|
||||||
timestamp information (mtime) if it can't get
|
timestamp information (mtime) if it can't get
|
||||||
date information from the metadata.
|
date information from the metadata.
|
||||||
`JINJA_EXTENSIONS` (``[]``) A list of any Jinja2 extensions you want to use.
|
`JINJA_EXTENSIONS` (``[]``) A list of any Jinja2 extensions you want to use.
|
||||||
`DELETE_OUTPUT_DIRECTORY` (``False``) Delete the output directory as well as
|
`DELETE_OUTPUT_DIRECTORY` (``False``) Delete the output directory as well as
|
||||||
the generated files.
|
the generated files.
|
||||||
`LOCALE` (''[#]_) Change the locale. A list of locales can be provided
|
`LOCALE` (''[#]_) Change the locale. A list of locales can be provided
|
||||||
here or a single string representing one locale.
|
here or a single string representing one locale.
|
||||||
When providing a list, all the locales will be tried
|
When providing a list, all the locales will be tried
|
||||||
until one works.
|
until one works.
|
||||||
`MARKUP` (``('rst', 'md')``) A list of available markup languages you want
|
`MARKUP` (``('rst', 'md')``) A list of available markup languages you want
|
||||||
to use. For the moment, the only available values
|
to use. For the moment, the only available values
|
||||||
are `rst` and `md`.
|
are `rst` and `md`.
|
||||||
`MD_EXTENSIONS` (``['codehilite','extra']``) A list of the extensions that the Markdown processor
|
`MD_EXTENSIONS` (``['codehilite','extra']``) A list of the extensions that the Markdown processor
|
||||||
will use. Refer to the extensions chapter in the
|
will use. Refer to the extensions chapter in the
|
||||||
Python-Markdown documentation for a complete list of
|
Python-Markdown documentation for a complete list of
|
||||||
supported extensions.
|
supported extensions.
|
||||||
`OUTPUT_PATH` (``'output/'``) Where to output the generated files.
|
`OUTPUT_PATH` (``'output/'``) Where to output the generated files.
|
||||||
`PATH` (``None``) Path to look at for input files.
|
`PATH` (``None``) Path to look at for input files.
|
||||||
`PAGE_DIR` (``'pages'``) Directory to look at for pages.
|
`PAGE_DIR` (``'pages'``) Directory to look at for pages.
|
||||||
`PAGE_EXCLUDES` (``()``) A list of directories to exclude when looking for pages.
|
`PAGE_EXCLUDES` (``()``) A list of directories to exclude when looking for pages.
|
||||||
`ARTICLE_DIR` (``''``) Directory to look at for articles.
|
`ARTICLE_DIR` (``''``) Directory to look at for articles.
|
||||||
`ARTICLE_EXCLUDES`: (``('pages',)``) A list of directories to exclude when looking for articles.
|
`ARTICLE_EXCLUDES`: (``('pages',)``) A list of directories to exclude when looking for articles.
|
||||||
`PDF_GENERATOR` (``False``) Set to True if you want to have PDF versions
|
`PDF_GENERATOR` (``False``) Set to True if you want to have PDF versions
|
||||||
of your documents. You will need to install
|
of your documents. You will need to install
|
||||||
`rst2pdf`.
|
`rst2pdf`.
|
||||||
`RELATIVE_URLS` (``True``) Defines whether Pelican should use relative URLs or
|
`RELATIVE_URLS` (``True``) Defines whether Pelican should use relative URLs or
|
||||||
not.
|
not.
|
||||||
`SITENAME` (``'A Pelican Blog'``) Your site name
|
`SITENAME` (``'A Pelican Blog'``) Your site name
|
||||||
`SITEURL` Base URL of your website. Not defined by default,
|
`SITEURL` Base URL of your website. Not defined by default,
|
||||||
which means the base URL is assumed to be "/" with a
|
which means the base URL is assumed to be "/" with a
|
||||||
root-relative URL structure. If `SITEURL` is specified
|
root-relative URL structure. If `SITEURL` is specified
|
||||||
explicitly, there should be no trailing slash at the end,
|
explicitly, there should be no trailing slash at the end,
|
||||||
and URLs will be generated with an absolute URL structure
|
and URLs will be generated with an absolute URL structure
|
||||||
(including the domain). If you want to use relative URLs
|
(including the domain). If you want to use relative URLs
|
||||||
instead of root-relative or absolute URLs, you should
|
instead of root-relative or absolute URLs, you should
|
||||||
instead use the `RELATIVE_URL` setting.
|
instead use the `RELATIVE_URL` setting.
|
||||||
`STATIC_PATHS` (``['images']``) The static paths you want to have accessible
|
`STATIC_PATHS` (``['images']``) The static paths you want to have accessible
|
||||||
on the output path "static". By default,
|
on the output path "static". By default,
|
||||||
Pelican will copy the 'images' folder to the
|
Pelican will copy the 'images' folder to the
|
||||||
output folder.
|
output folder.
|
||||||
`TIMEZONE` The timezone used in the date information, to
|
`TIMEZONE` The timezone used in the date information, to
|
||||||
generate Atom and RSS feeds. See the "timezone"
|
generate Atom and RSS feeds. See the "timezone"
|
||||||
section below for more info.
|
section below for more info.
|
||||||
`TYPOGRIFY` (``False``) If set to true, some
|
`TYPOGRIFY` (``False``) If set to true, some
|
||||||
additional transformations will be done on the
|
additional transformations will be done on the
|
||||||
generated HTML, using the `Typogrify
|
generated HTML, using the `Typogrify
|
||||||
<http://static.mintchaos.com/projects/typogrify/>`_
|
<http://static.mintchaos.com/projects/typogrify/>`_
|
||||||
library
|
library
|
||||||
================================================ =====================================================
|
`DIRECT_TEMPLATES` (``('index', 'tags', 'categories', '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.
|
||||||
|
`PAGINATED_DIRECT_TEMPLATES` (``('index',)``) Provides the direct templates that should be paginated.
|
||||||
|
===================================================================== =====================================================================
|
||||||
|
|
||||||
.. [#] Default is the system locale.
|
.. [#] Default is the system locale.
|
||||||
|
|
||||||
|
|
@ -96,7 +101,7 @@ your articles in a location such as '{slug}/index.html' and link to them as
|
||||||
'{slug}' for clean URLs. These settings give you the flexibility to place your
|
'{slug}' for clean URLs. These settings give you the flexibility to place your
|
||||||
articles and pages anywhere you want.
|
articles and pages anywhere you want.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
If you specify a datetime directive, it will be substituted using the
|
If you specify a datetime directive, it will be substituted using the
|
||||||
input files' date metadata attribute. If the date is not specified for a
|
input files' date metadata attribute. If the date is not specified for a
|
||||||
particular file, Pelican will rely on the file's mtime timestamp.
|
particular file, Pelican will rely on the file's mtime timestamp.
|
||||||
|
|
@ -141,17 +146,15 @@ Setting name (default value) what does it do?
|
||||||
`CATEGORY_SAVE_AS` ('category/{name}.html') The location to save a category.
|
`CATEGORY_SAVE_AS` ('category/{name}.html') The location to save a category.
|
||||||
`TAG_URL` ('tag/{name}.html') The URL to use for a tag.
|
`TAG_URL` ('tag/{name}.html') The URL to use for a tag.
|
||||||
`TAG_SAVE_AS` ('tag/{name}.html') The location to save the tag page.
|
`TAG_SAVE_AS` ('tag/{name}.html') The location to save the tag page.
|
||||||
|
`<DIRECT_TEMPLATE_NAME>_SAVE_AS` The location to save content generated from direct
|
||||||
|
templates. Where <DIRECT_TEMPLATE_NAME> is the
|
||||||
|
upper case template name.
|
||||||
================================================ =====================================================
|
================================================ =====================================================
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
When any of `*_SAVE_AS` is set to False, files will not be created.
|
When any of `*_SAVE_AS` is set to False, files will not be created.
|
||||||
|
|
||||||
You can change the file output location of any pages listed in DIRECT_TEMPLATES
|
|
||||||
by providing a setting <TEMPLATE_NAME>_SAVE_AS, where <TEMPLATE_NAME> is the template
|
|
||||||
name in uppercase; e.g. CATEGORIES. If False it will not be created.
|
|
||||||
|
|
||||||
|
|
||||||
Timezone
|
Timezone
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue