mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Show setting defaults as actual code
For some reason, setting names on the Settings page have long been wrapped in single back-ticks (usually meant for linking in reST) instead of double back-ticks (meant for denoting code). This seems to be widespread throughout the docs, and it's not clear if this is intentional or simply a reST formatting error that got propagated by others in order to stay consistent. This commit applies double back-ticks in any case where something resembling code is shown, with the idea that single back-ticks should only be used when linking. More importantly, the settings denoted their default values in parentheses, which hapless users often included when copying and pasting these values into their config files. As one can imagine, confusion — not hilarity — ensued. Setting defaults are now shown as they would actually appear in one's settings file, with an equal sign and without parentheses. During this spelunking expedition, many other minor improvements were concurrently conducted.
This commit is contained in:
parent
3d53b4ca17
commit
81cd781c45
1 changed files with 211 additions and 213 deletions
|
|
@ -6,8 +6,8 @@ the command line::
|
|||
|
||||
$ pelican content -s path/to/your/settingsfile.py
|
||||
|
||||
(If you used the `pelican-quickstart` command, your primary settings file will
|
||||
be named `pelicanconf.py` by default.)
|
||||
(If you used the ``pelican-quickstart`` command, your primary settings file will
|
||||
be named ``pelicanconf.py`` by default.)
|
||||
|
||||
Settings are configured in the form of a Python module (a file). There is an
|
||||
`example settings file
|
||||
|
|
@ -32,33 +32,33 @@ Basic settings
|
|||
==============
|
||||
|
||||
=============================================================================== =====================================================================
|
||||
Setting name (default value) What does it do?
|
||||
Setting name (followed by default value, if any) What does it do?
|
||||
=============================================================================== =====================================================================
|
||||
`AUTHOR` Default author (put your name)
|
||||
`DATE_FORMATS` (``{}``) If you manage multiple languages, you can set the date formatting
|
||||
``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 locale" section below for details.
|
||||
`USE_FOLDER_AS_CATEGORY` (``True``) When you don't specify a category in your post metadata, set this
|
||||
``USE_FOLDER_AS_CATEGORY = True`` When you don't specify a category in your post metadata, set this
|
||||
setting to ``True``, and organize your articles in subfolders, the
|
||||
subfolder will become the category of your post. If set to ``False``,
|
||||
``DEFAULT_CATEGORY`` will be used as a fallback.
|
||||
`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.
|
||||
`DISPLAY_PAGES_ON_MENU` (``True``) Whether to display pages on the menu of the
|
||||
``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.
|
||||
``DISPLAY_PAGES_ON_MENU = True`` Whether to display pages on the menu of the
|
||||
template. Templates may or may not honor this
|
||||
setting.
|
||||
`DISPLAY_CATEGORIES_ON_MENU` (``True``) Whether to display categories on the menu of the
|
||||
``DISPLAY_CATEGORIES_ON_MENU = True`` Whether to display categories on the menu of the
|
||||
template. Templates may or not honor this
|
||||
setting.
|
||||
`DEFAULT_DATE` (``None``) The default date you want to use.
|
||||
``DEFAULT_DATE = None`` The default date you want to use.
|
||||
If ``fs``, Pelican will use the file system
|
||||
timestamp information (mtime) if it can't get
|
||||
date information from the metadata.
|
||||
If set to a tuple object, the default datetime object will instead
|
||||
be generated by passing the tuple to the
|
||||
``datetime.datetime`` constructor.
|
||||
`DEFAULT_METADATA` (``()``) The default metadata you want to use for all articles
|
||||
``DEFAULT_METADATA = ()`` The default metadata you want to use for all articles
|
||||
and pages.
|
||||
`FILENAME_METADATA` (``'(?P<date>\d{4}-\d{2}-\d{2}).*'``) The regexp that will be used to extract any metadata
|
||||
``FILENAME_METADATA =`` ``'(?P<date>\d{4}-\d{2}-\d{2}).*'`` The regexp that will be used to extract any metadata
|
||||
from the filename. All named groups that are matched
|
||||
will be set in the metadata object.
|
||||
The default value will only extract the date from
|
||||
|
|
@ -67,38 +67,38 @@ Setting name (default value)
|
|||
date and the slug, you could set something like:
|
||||
``'(?P<date>\d{4}-\d{2}-\d{2})_(?P<slug>.*)'``.
|
||||
See :ref:`path_metadata`.
|
||||
`PATH_METADATA` (``''``) Like ``FILENAME_METADATA``, but parsed from a page's
|
||||
``PATH_METADATA = ''`` Like ``FILENAME_METADATA``, but parsed from a page's
|
||||
full path relative to the content source directory.
|
||||
See :ref:`path_metadata`.
|
||||
`EXTRA_PATH_METADATA` (``{}``) Extra metadata dictionaries keyed by relative path.
|
||||
``EXTRA_PATH_METADATA = {}`` Extra metadata dictionaries keyed by relative path.
|
||||
See :ref:`path_metadata`.
|
||||
`DELETE_OUTPUT_DIRECTORY` (``False``) Delete the output directory, and **all** of its contents, before
|
||||
``DELETE_OUTPUT_DIRECTORY = False`` Delete the output directory, and **all** of its contents, before
|
||||
generating new files. This can be useful in preventing older,
|
||||
unnecessary files from persisting in your output. However, **this is
|
||||
a destructive setting and should be handled with extreme care.**
|
||||
`OUTPUT_RETENTION` (``()``) A tuple of filenames that should be retained and not deleted from the
|
||||
``OUTPUT_RETENTION = ()`` A tuple of filenames that should be retained and not deleted from the
|
||||
output directory. One use case would be the preservation of version
|
||||
control data. For example: ``(".hg", ".git", ".bzr")``
|
||||
`JINJA_EXTENSIONS` (``[]``) A list of any Jinja2 extensions you want to use.
|
||||
`JINJA_FILTERS` (``{}``) A list of custom Jinja2 filters you want to use.
|
||||
``JINJA_EXTENSIONS = []`` A list of any Jinja2 extensions you want to use.
|
||||
``JINJA_FILTERS = {}`` A list of custom Jinja2 filters you want to use.
|
||||
The dictionary should map the filtername to the filter function.
|
||||
For example: ``{'urlencode': urlencode_filter}``
|
||||
See `Jinja custom filters documentation`_.
|
||||
`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.
|
||||
When providing a list, all the locales will be tried
|
||||
until one works.
|
||||
`LOG_FILTER` (``[]``) A list of tuples containing the logging level (up to ``warning``)
|
||||
``LOG_FILTER = []`` A list of tuples containing the logging level (up to ``warning``)
|
||||
and the message to be ignored.
|
||||
For example: ``[(logging.WARN, 'TAG_SAVE_AS is set to False')]``
|
||||
`READERS` (``{}``) A dictionary of file extensions / Reader classes for Pelican to
|
||||
``READERS = {}`` A dictionary of file extensions / Reader classes for Pelican to
|
||||
process or ignore. For example, to avoid processing .html files,
|
||||
set: ``READERS = {'html': None}``. To add a custom reader for the
|
||||
`foo` extension, set: ``READERS = {'foo': FooReader}``
|
||||
`IGNORE_FILES` (``['.#*']``) A list of file globbing patterns to match against the
|
||||
``IGNORE_FILES = ['.#*']`` A list of file globbing patterns to match against the
|
||||
source files to be ignored by the processor. For example,
|
||||
the default ``['.#*']`` will ignore emacs lock files.
|
||||
`MD_EXTENSIONS` (``['codehilite(css_class=highlight)','extra']``) A list of the extensions that the Markdown processor
|
||||
``MD_EXTENSIONS =`` ``['codehilite(css_class=highlight)','extra']`` A list of the extensions that the Markdown processor
|
||||
will use. Refer to the Python Markdown documentation's
|
||||
`Extensions section <http://pythonhosted.org/Markdown/extensions/>`_
|
||||
for a complete list of supported extensions. (Note that
|
||||
|
|
@ -107,87 +107,87 @@ Setting name (default value)
|
|||
to the default values for this setting, you'll need to
|
||||
include them explicitly and enumerate the full list of
|
||||
desired Markdown extensions.)
|
||||
`OUTPUT_PATH` (``'output/'``) Where to output the generated files.
|
||||
`PATH` (``None``) Path to content directory to be processed by Pelican.
|
||||
`PAGE_DIR` (``'pages'``) Directory to look at for pages, relative to `PATH`.
|
||||
`PAGE_EXCLUDES` (``()``) A list of directories to exclude when looking for pages.
|
||||
`ARTICLE_DIR` (``''``) Directory to look at for articles, relative to `PATH`.
|
||||
`ARTICLE_EXCLUDES`: (``('pages',)``) A list of directories to exclude when looking for articles.
|
||||
`OUTPUT_SOURCES` (``False``) Set to True if you want to copy the articles and pages in their
|
||||
``OUTPUT_PATH = 'output/'`` Where to output the generated files.
|
||||
``PATH = None`` Path to content directory to be processed by Pelican.
|
||||
``PAGE_DIR = 'pages'`` Directory to look at for pages, relative to `PATH`.
|
||||
``PAGE_EXCLUDES = ()`` A list of directories to exclude when looking for pages.
|
||||
``ARTICLE_DIR = ''`` Directory to look at for articles, relative to `PATH`.
|
||||
``ARTICLE_EXCLUDES` = ('pages',)`` A list of directories to exclude when looking for articles.
|
||||
``OUTPUT_SOURCES = False`` Set to True if you want to copy the articles and pages in their
|
||||
original format (e.g. Markdown or reStructuredText) to the
|
||||
specified ``OUTPUT_PATH``.
|
||||
`OUTPUT_SOURCES_EXTENSION` (``.text``) Controls the extension that will be used by the SourcesGenerator.
|
||||
``OUTPUT_SOURCES_EXTENSION = '.text'`` Controls the extension that will be used by the SourcesGenerator.
|
||||
Defaults to ``.text``. If not a valid string the default value
|
||||
will be used.
|
||||
`RELATIVE_URLS` (``False``) Defines whether Pelican should use document-relative URLs or
|
||||
``RELATIVE_URLS = False`` Defines whether Pelican should use document-relative URLs or
|
||||
not. Only set this to ``True`` when developing/testing and only
|
||||
if you fully understand the effect it can have on links/feeds.
|
||||
`PLUGINS` (``[]``) The list of plugins to load. See :ref:`plugins`.
|
||||
`SITENAME` (``'A Pelican Blog'``) Your site name
|
||||
`SITEURL` Base URL of your website. Not defined by default,
|
||||
``PLUGINS = []`` The list of plugins to load. See :ref:`plugins`.
|
||||
``SITENAME = 'A Pelican Blog'`` Your site name
|
||||
``SITEURL`` Base URL of your website. Not defined by default,
|
||||
so it is best to specify your SITEURL; if you do not, feeds
|
||||
will not be generated with properly-formed URLs. You should
|
||||
include ``http://`` and your domain, with no trailing
|
||||
slash at the end. Example: ``SITEURL = 'http://mydomain.com'``
|
||||
`TEMPLATE_PAGES` (``None``) A mapping containing template pages that will be rendered with
|
||||
``TEMPLATE_PAGES = None`` A mapping containing template pages that will be rendered with
|
||||
the blog entries. See :ref:`template_pages`.
|
||||
`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,
|
||||
Pelican will copy the "images" folder to the
|
||||
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*
|
||||
section below for more info.
|
||||
`TYPOGRIFY` (``False``) If set to True, several typographical improvements will be
|
||||
``TYPOGRIFY = False`` If set to True, several typographical improvements will be
|
||||
incorporated into the generated HTML via the `Typogrify
|
||||
<https://pypi.python.org/pypi/typogrify>`_ library,
|
||||
which can be installed via: ``pip install typogrify``
|
||||
`DIRECT_TEMPLATES` (``('index', 'tags', 'categories', 'authors', 'archives')``) List of templates that are used directly to render
|
||||
``DIRECT_TEMPLATES =`` ``('index', '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
|
||||
are not needed, set ``DIRECT_TEMPLATES = ('index', 'archives')``
|
||||
`PAGINATED_DIRECT_TEMPLATES` (``('index',)``) Provides the direct templates that should be paginated.
|
||||
`SUMMARY_MAX_LENGTH` (``50``) When creating a short summary of an article, this will
|
||||
``PAGINATED_DIRECT_TEMPLATES = ('index',)`` Provides the direct templates that should be paginated.
|
||||
``SUMMARY_MAX_LENGTH = 50`` When creating a short summary of an article, this will
|
||||
be the default length (measured in words) of the text created.
|
||||
This only applies if your content does not otherwise
|
||||
specify a summary. Setting to ``None`` will cause the summary
|
||||
to be a copy of the original content.
|
||||
`EXTRA_TEMPLATES_PATHS` (``[]``) A list of paths you want Jinja2 to search for templates.
|
||||
``EXTRA_TEMPLATES_PATHS = []`` A list of paths you want Jinja2 to search for templates.
|
||||
Can be used to separate templates from the theme.
|
||||
Example: projects, resume, profile ...
|
||||
These templates need to use ``DIRECT_TEMPLATES`` setting.
|
||||
`ASCIIDOC_OPTIONS` (``[]``) A list of options to pass to AsciiDoc. See the `manpage
|
||||
<http://www.methods.co.nz/asciidoc/manpage.html>`_
|
||||
`WITH_FUTURE_DATES` (``True``) If disabled, content with dates in the future will get a
|
||||
default status of ``draft``.
|
||||
see :ref:`reading_only_modified_content` for details.
|
||||
`INTRASITE_LINK_REGEX` (``'[{|](?P<what>.*?)[|}]'``) Regular expression that is used to parse internal links.
|
||||
Default syntax of links to internal files, tags, etc., is
|
||||
to enclose the identifier, say ``filename``, in ``{}`` or ``||``.
|
||||
Identifier between ``{`` and ``}`` goes into the ``what`` capturing group.
|
||||
``ASCIIDOC_OPTIONS = []`` A list of options to pass to AsciiDoc. See the `manpage
|
||||
<http://www.methods.co.nz/asciidoc/manpage.html>`_.
|
||||
``WITH_FUTURE_DATES = True`` If disabled, content with dates in the future will get a default
|
||||
status of ``draft``. See :ref:`reading_only_modified_content`
|
||||
for caveats.
|
||||
``INTRASITE_LINK_REGEX = '[{|](?P<what>.*?)[|}]'`` Regular expression that is used to parse internal links. Default
|
||||
syntax when linking to internal files, tags, etc., is to enclose
|
||||
the identifier, say ``filename``, in ``{}`` or ``||``. Identifier
|
||||
between ``{`` and ``}`` goes into the ``what`` capturing group.
|
||||
For details see :ref:`ref-linking-to-internal-content`.
|
||||
`PYGMENTS_RST_OPTIONS` (``[]``) A list of default Pygments settings for your reStructuredText
|
||||
``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.
|
||||
|
||||
`SLUGIFY_SOURCE` (``'input'``) Specifies where you want the slug to be automatically generated
|
||||
from. Can be set to 'title' to use the 'Title:' metadata tag or
|
||||
'basename' to use the articles basename when creating the slug.
|
||||
`CACHE_CONTENT` (``True``) If ``True``, save content in a cache file.
|
||||
``SLUGIFY_SOURCE = 'input'`` Specifies where you want the slug to be automatically generated
|
||||
from. Can be set to ``title`` to use the 'Title:' metadata tag or
|
||||
``basename`` to use the article's basename when creating the slug.
|
||||
``CACHE_CONTENT = True`` If ``True``, save content in a cache file.
|
||||
See :ref:`reading_only_modified_content` for details about caching.
|
||||
`CONTENT_CACHING_LAYER` (``'reader'``) If set to ``'reader'``, save only the raw content and metadata returned
|
||||
by readers, if set to ``'generator'``, save processed content objects.
|
||||
`CACHE_DIRECTORY` (``cache``) Directory in which to store cache files.
|
||||
`GZIP_CACHE` (``True``) If ``True``, use gzip to (de)compress the cache files.
|
||||
`CHECK_MODIFIED_METHOD` (``mtime``) Controls how files are checked for modifications.
|
||||
`LOAD_CONTENT_CACHE` (``True``) If ``True``, load unmodified content from cache.
|
||||
`AUTORELOAD_IGNORE_CACHE` (``False``) If ``True``, do not load content cache in autoreload mode
|
||||
``CONTENT_CACHING_LAYER = 'reader'`` If set to ``'reader'``, save only the raw content and metadata
|
||||
returned by readers. If set to ``'generator'``, save processed
|
||||
content objects.
|
||||
``CACHE_DIRECTORY = 'cache'`` Directory in which to store cache files.
|
||||
``GZIP_CACHE = True`` If ``True``, use gzip to (de)compress the cache files.
|
||||
``CHECK_MODIFIED_METHOD = 'mtime'`` Controls how files are checked for modifications.
|
||||
``LOAD_CONTENT_CACHE = True`` If ``True``, load unmodified content from cache.
|
||||
``AUTORELOAD_IGNORE_CACHE = False`` If ``True``, do not load content cache in autoreload mode
|
||||
when the settings file changes.
|
||||
`WRITE_SELECTED` (``[]``) If this list is not empty, **only** output files with their paths
|
||||
in this list are written. Paths should be either relative to the current
|
||||
working directory of Pelican or absolute. For possible use cases see
|
||||
:ref:`writing_only_selected_content`.
|
||||
``WRITE_SELECTED = []`` If this list is not empty, **only** output files with their paths
|
||||
in this list are written. Paths should be either absolute or relative
|
||||
to the current Pelican working directory. For possible use cases see
|
||||
:ref:`writing_only_selected_content`.
|
||||
=============================================================================== =====================================================================
|
||||
|
||||
.. [#] Default is the system locale.
|
||||
|
|
@ -231,8 +231,8 @@ Also, you can use other file metadata attributes as well:
|
|||
|
||||
Example usage:
|
||||
|
||||
* ARTICLE_URL = ``'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'``
|
||||
* ARTICLE_SAVE_AS = ``'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'``
|
||||
* ``ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'``
|
||||
* ``ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'``
|
||||
|
||||
This would save your articles in something like ``/posts/2011/Aug/07/sample-post/index.html``,
|
||||
and the URL to this would be ``/posts/2011/Aug/07/sample-post/``.
|
||||
|
|
@ -245,8 +245,8 @@ make it easier for readers to navigate through the posts you've written over tim
|
|||
|
||||
Example usage:
|
||||
|
||||
* YEAR_ARCHIVE_SAVE_AS = ``'posts/{date:%Y}/index.html'``
|
||||
* MONTH_ARCHIVE_SAVE_AS = ``'posts/{date:%Y}/{date:%b}/index.html'``
|
||||
* ``YEAR_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/index.html'``
|
||||
* ``MONTH_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/index.html'``
|
||||
|
||||
With these settings, Pelican will create an archive of all your posts for the
|
||||
year at (for instance) ``posts/2011/index.html`` and an archive of all your
|
||||
|
|
@ -258,43 +258,43 @@ posts for the month at ``posts/2011/Aug/index.html``.
|
|||
arrive at an appropriate archive of posts, without having to specify
|
||||
a page name.
|
||||
|
||||
====================================================== =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
====================================================== =====================================================
|
||||
`ARTICLE_URL` (``'{slug}.html'``) The URL to refer to an article.
|
||||
`ARTICLE_SAVE_AS` (``'{slug}.html'``) The place where we will save an article.
|
||||
`ARTICLE_LANG_URL` (``'{slug}-{lang}.html'``) The URL to refer to an article which doesn't use the
|
||||
====================================================== ========================================================
|
||||
Setting name (followed by default value, if any) What does it do?
|
||||
====================================================== ========================================================
|
||||
``ARTICLE_URL = '{slug}.html'`` The URL to refer to an article.
|
||||
``ARTICLE_SAVE_AS = '{slug}.html'`` The place where we will save an article.
|
||||
``ARTICLE_LANG_URL = '{slug}-{lang}.html'`` The URL to refer to an article which doesn't use the
|
||||
default language.
|
||||
`ARTICLE_LANG_SAVE_AS` (``'{slug}-{lang}.html'``) The place where we will save an article which
|
||||
``ARTICLE_LANG_SAVE_AS = '{slug}-{lang}.html'`` The place where we will save an article which
|
||||
doesn't use the default language.
|
||||
`DRAFT_URL` (``'drafts/{slug}.html'``) The URL to refer to an article draft.
|
||||
`DRAFT_SAVE_AS` (``'drafts/{slug}.html'``) The place where we will save an article draft.
|
||||
`DRAFT_LANG_URL` (``'drafts/{slug}-{lang}.html'``) The URL to refer to an article draft which doesn't
|
||||
``DRAFT_URL = 'drafts/{slug}.html'`` The URL to refer to an article draft.
|
||||
``DRAFT_SAVE_AS = 'drafts/{slug}.html'`` The place where we will save an article draft.
|
||||
``DRAFT_LANG_URL = 'drafts/{slug}-{lang}.html'`` The URL to refer to an article draft which doesn't
|
||||
use the default language.
|
||||
`DRAFT_LANG_SAVE_AS` (``'drafts/{slug}-{lang}.html'``) The place where we will save an article draft which
|
||||
``DRAFT_LANG_SAVE_AS = 'drafts/{slug}-{lang}.html'`` The place where we will save an article draft which
|
||||
doesn't use the default language.
|
||||
`PAGE_URL` (``'pages/{slug}.html'``) The URL we will use to link to a page.
|
||||
`PAGE_SAVE_AS` (``'pages/{slug}.html'``) The location we will save the page. This value has to be
|
||||
``PAGE_URL = 'pages/{slug}.html'`` The URL we will use to link to a page.
|
||||
``PAGE_SAVE_AS = 'pages/{slug}.html'`` The location we will save the page. This value has to be
|
||||
the same as PAGE_URL or you need to use a rewrite in
|
||||
your server config.
|
||||
`PAGE_LANG_URL` (``'pages/{slug}-{lang}.html'``) The URL we will use to link to a page which doesn't
|
||||
``PAGE_LANG_URL = 'pages/{slug}-{lang}.html'`` The URL we will use to link to a page which doesn't
|
||||
use the default language.
|
||||
`PAGE_LANG_SAVE_AS` (``'pages/{slug}-{lang}.html'``) The location we will save the page which doesn't
|
||||
``PAGE_LANG_SAVE_AS = 'pages/{slug}-{lang}.html'`` The location we will save the page which doesn't
|
||||
use the default language.
|
||||
`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.
|
||||
`AUTHOR_URL` (``'author/{slug}.html'``) The URL to use for an author.
|
||||
`AUTHOR_SAVE_AS` (``'author/{slug}.html'``) The location to save an author.
|
||||
`YEAR_ARCHIVE_SAVE_AS` (``''``) The location to save per-year archives of your posts.
|
||||
`MONTH_ARCHIVE_SAVE_AS` (``''``) The location to save per-month archives of your posts.
|
||||
`DAY_ARCHIVE_SAVE_AS` (``''``) The location to save per-day archives of your posts.
|
||||
`SLUG_SUBSTITUTIONS` (``()``) Substitutions to make prior to stripping out
|
||||
``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.
|
||||
``AUTHOR_URL = 'author/{slug}.html'`` The URL to use for an author.
|
||||
``AUTHOR_SAVE_AS = 'author/{slug}.html'`` The location to save an author.
|
||||
``YEAR_ARCHIVE_SAVE_AS = ''`` The location to save per-year archives of your posts.
|
||||
``MONTH_ARCHIVE_SAVE_AS = ''`` The location to save per-month archives of your posts.
|
||||
``DAY_ARCHIVE_SAVE_AS = ''`` 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
|
||||
applied in order.
|
||||
====================================================== =====================================================
|
||||
====================================================== ========================================================
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -303,23 +303,21 @@ Setting name (default value) What does it do?
|
|||
set the corresponding ``*_SAVE_AS`` setting to ``''`` 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:
|
||||
``DIRECT_TEMPLATES``, which are ``('index', 'tags', 'categories', 'archives')``
|
||||
by default, work a bit differently than noted above. Only the ``_SAVE_AS``
|
||||
settings are available:
|
||||
|
||||
============================================= ===============================================
|
||||
Setting name (default value) What does it do?
|
||||
Setting name (followed by 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.
|
||||
``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'``.
|
||||
URLs for direct template pages are theme-dependent. Some themes hard-code them:
|
||||
``'archives.html'``, ``'authors.html'``, ``'categories.html'``, ``'tags.html'``.
|
||||
|
||||
Timezone
|
||||
--------
|
||||
|
|
@ -460,33 +458,33 @@ Pelican generates category feeds as well as feeds for all your articles. It does
|
|||
not generate feeds for tags by default, but it is possible to do so using
|
||||
the ``TAG_FEED_ATOM`` and ``TAG_FEED_RSS`` settings:
|
||||
|
||||
================================================ =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
================================================ =====================================================
|
||||
`FEED_DOMAIN` (``None``, i.e. base URL is "/") The domain prepended to feed URLs. Since feed URLs
|
||||
================================================= =====================================================
|
||||
Setting name (followed by default value, if any) What does it do?
|
||||
================================================= =====================================================
|
||||
``FEED_DOMAIN = None``, i.e. base URL is "/" The domain prepended to feed URLs. Since feed URLs
|
||||
should always be absolute, it is highly recommended
|
||||
to define this (e.g., "http://feeds.example.com"). If
|
||||
you have already explicitly defined SITEURL (see
|
||||
above) and want to use the same domain for your
|
||||
feeds, you can just set: ``FEED_DOMAIN = SITEURL``.
|
||||
`FEED_ATOM` (``None``, i.e. no Atom feed) Relative URL to output the Atom feed.
|
||||
`FEED_RSS` (``None``, i.e. no RSS) Relative URL to output the RSS feed.
|
||||
`FEED_ALL_ATOM` (``'feeds/all.atom.xml'``) Relative URL to output the all posts Atom feed:
|
||||
``FEED_ATOM = None``, i.e. no Atom feed Relative URL to output the Atom feed.
|
||||
``FEED_RSS = None``, i.e. no RSS Relative URL to output the RSS feed.
|
||||
``FEED_ALL_ATOM = 'feeds/all.atom.xml'`` Relative URL to output the all-posts Atom feed:
|
||||
this feed will contain all posts regardless of their
|
||||
language.
|
||||
`FEED_ALL_RSS` (``None``, i.e. no all RSS) Relative URL to output the all posts RSS feed:
|
||||
``FEED_ALL_RSS = None``, i.e. no all-posts RSS Relative URL to output the all-posts RSS feed:
|
||||
this feed will contain all posts regardless of their
|
||||
language.
|
||||
`CATEGORY_FEED_ATOM` ('feeds/%s.atom.xml'[2]_) Where to put the category Atom feeds.
|
||||
`CATEGORY_FEED_RSS` (``None``, i.e. no RSS) Where to put the category RSS feeds.
|
||||
`AUTHOR_FEED_ATOM` ('feeds/%s.atom.xml'[2]_) Where to put the author Atom feeds.
|
||||
`AUTHOR_FEED_RSS` ('feeds/%s.rss.xml'[2]_) Where to put the author RSS feeds.
|
||||
`TAG_FEED_ATOM` (``None``, i.e. no tag feed) Relative URL to output the tag Atom feed. It should
|
||||
``CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'`` [2]_ Where to put the category Atom feeds.
|
||||
``CATEGORY_FEED_RSS = None``, i.e. no RSS Where to put the category RSS feeds.
|
||||
``AUTHOR_FEED_ATOM = 'feeds/%s.atom.xml'`` [2]_ Where to put the author Atom feeds.
|
||||
``AUTHOR_FEED_RSS = 'feeds/%s.rss.xml'`` [2]_ Where to put the author RSS feeds.
|
||||
``TAG_FEED_ATOM = None``, i.e. no tag feed Relative URL to output the tag Atom feed. It should
|
||||
be defined using a "%s" match in the tag name.
|
||||
`TAG_FEED_RSS` (``None``, ie no RSS tag feed) Relative URL to output the tag RSS feed
|
||||
`FEED_MAX_ITEMS` Maximum number of items allowed in a feed. Feed item
|
||||
``TAG_FEED_RSS = None``, i.e. no RSS tag feed Relative URL to output the tag RSS feed
|
||||
``FEED_MAX_ITEMS`` Maximum number of items allowed in a feed. Feed item
|
||||
quantity is unrestricted by default.
|
||||
================================================ =====================================================
|
||||
================================================= =====================================================
|
||||
|
||||
If you don't want to generate some or any of these feeds, set the above variables to ``None``.
|
||||
|
||||
|
|
@ -499,17 +497,17 @@ If you want to use FeedBurner for your feed, you will likely need to decide
|
|||
upon a unique identifier. For example, if your site were called "Thyme" and
|
||||
hosted on the www.example.com domain, you might use "thymefeeds" as your
|
||||
unique identifier, which we'll use throughout this section for illustrative
|
||||
purposes. In your Pelican settings, set the `FEED_ATOM` attribute to
|
||||
"thymefeeds/main.xml" to create an Atom feed with an original address of
|
||||
`http://www.example.com/thymefeeds/main.xml`. Set the `FEED_DOMAIN` attribute
|
||||
to `http://feeds.feedburner.com`, or `http://feeds.example.com` if you are
|
||||
using a CNAME on your own domain (i.e., FeedBurner's "MyBrand" feature).
|
||||
purposes. In your Pelican settings, set the ``FEED_ATOM`` attribute to
|
||||
``thymefeeds/main.xml`` to create an Atom feed with an original address of
|
||||
``http://www.example.com/thymefeeds/main.xml``. Set the ``FEED_DOMAIN``
|
||||
attribute to ``http://feeds.feedburner.com``, or ``http://feeds.example.com`` if
|
||||
you are using a CNAME on your own domain (i.e., FeedBurner's "MyBrand" feature).
|
||||
|
||||
There are two fields to configure in the `FeedBurner
|
||||
<http://feedburner.google.com>`_ interface: "Original Feed" and "Feed
|
||||
Address". In this example, the "Original Feed" would be
|
||||
`http://www.example.com/thymefeeds/main.xml` and the "Feed Address" suffix
|
||||
would be `thymefeeds/main.xml`.
|
||||
``http://www.example.com/thymefeeds/main.xml`` and the "Feed Address" suffix
|
||||
would be ``thymefeeds/main.xml``.
|
||||
|
||||
Pagination
|
||||
==========
|
||||
|
|
@ -522,15 +520,15 @@ benefit from paginating this list.
|
|||
You can use the following settings to configure the pagination.
|
||||
|
||||
================================================ =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
Setting name (followed by default value, if any) What does it do?
|
||||
================================================ =====================================================
|
||||
`DEFAULT_ORPHANS` (``0``) The minimum number of articles allowed on the
|
||||
``DEFAULT_ORPHANS = 0`` The minimum number of articles allowed on the
|
||||
last page. Use this when you don't want the last page
|
||||
to only contain a handful of articles.
|
||||
`DEFAULT_PAGINATION` (``False``) The maximum number of articles to include on a
|
||||
``DEFAULT_PAGINATION = False`` The maximum number of articles to include on a
|
||||
page, not including orphans. False to disable
|
||||
pagination.
|
||||
`PAGINATION_PATTERNS` A set of patterns that are used to determine advanced
|
||||
``PAGINATION_PATTERNS`` A set of patterns that are used to determine advanced
|
||||
pagination output.
|
||||
================================================ =====================================================
|
||||
|
||||
|
|
@ -563,11 +561,11 @@ If you want to generate a tag cloud with all your tags, you can do so using the
|
|||
following settings.
|
||||
|
||||
================================================ =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
Setting name (followed by default value) What does it do?
|
||||
================================================ =====================================================
|
||||
`TAG_CLOUD_STEPS` (``4``) Count of different font sizes in the tag
|
||||
``TAG_CLOUD_STEPS = 4`` Count of different font sizes in the tag
|
||||
cloud.
|
||||
`TAG_CLOUD_MAX_ITEMS` (``100``) Maximum number of tags in the cloud.
|
||||
``TAG_CLOUD_MAX_ITEMS = 100`` Maximum number of tags in the cloud.
|
||||
================================================ =====================================================
|
||||
|
||||
The default theme does not include a tag cloud, but it is pretty easy to add one::
|
||||
|
|
@ -608,13 +606,13 @@ Translations
|
|||
Pelican offers a way to translate articles. See the :doc:`Getting Started <getting_started>` section for
|
||||
more information.
|
||||
|
||||
===================================================== =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
===================================================== =====================================================
|
||||
`DEFAULT_LANG` (``'en'``) The default language to use.
|
||||
`TRANSLATION_FEED_ATOM` ('feeds/all-%s.atom.xml'[3]_) Where to put the Atom feed for translations.
|
||||
`TRANSLATION_FEED_RSS` (``None``, i.e. no RSS) Where to put the RSS feed for translations.
|
||||
===================================================== =====================================================
|
||||
======================================================== =====================================================
|
||||
Setting name (followed by default value, if any) What does it do?
|
||||
======================================================== =====================================================
|
||||
``DEFAULT_LANG = 'en'`` The default language to use.
|
||||
``TRANSLATION_FEED_ATOM = 'feeds/all-%s.atom.xml'`` [3]_ Where to put the Atom feed for translations.
|
||||
``TRANSLATION_FEED_RSS = None``, i.e. no RSS Where to put the RSS feed for translations.
|
||||
======================================================== =====================================================
|
||||
|
||||
.. [3] %s is the language
|
||||
|
||||
|
|
@ -622,11 +620,11 @@ Ordering content
|
|||
================
|
||||
|
||||
================================================ =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
Setting name (followed by default value) What does it do?
|
||||
================================================ =====================================================
|
||||
`NEWEST_FIRST_ARCHIVES` (``True``) Order archives by newest first by date. (False:
|
||||
``NEWEST_FIRST_ARCHIVES = True`` Order archives by newest first by date. (False:
|
||||
orders by date with older articles first.)
|
||||
`REVERSE_CATEGORY_ORDER` (``False``) Reverse the category order. (True: lists by reverse
|
||||
``REVERSE_CATEGORY_ORDER = False`` Reverse the category order. (True: lists by reverse
|
||||
alphabetical order; default lists alphabetically.)
|
||||
================================================ =====================================================
|
||||
|
||||
|
|
@ -637,32 +635,32 @@ Creating Pelican themes is addressed in a dedicated section (see :ref:`theming-p
|
|||
However, here are the settings that are related to themes.
|
||||
|
||||
================================================ =====================================================
|
||||
Setting name (default value) What does it do?
|
||||
Setting name (followed by default value, if any) What does it do?
|
||||
================================================ =====================================================
|
||||
`THEME` Theme to use to produce the output. Can be a relative
|
||||
``THEME`` Theme to use to produce the output. Can be a relative
|
||||
or absolute path to a theme folder, or the name of a
|
||||
default theme or a theme installed via
|
||||
``pelican-themes`` (see below).
|
||||
`THEME_STATIC_DIR` (``'theme'``) Destination directory in the output path where
|
||||
``THEME_STATIC_DIR = 'theme'`` Destination directory in the output path where
|
||||
Pelican will place the files collected from
|
||||
`THEME_STATIC_PATHS`. Default is `theme`.
|
||||
`THEME_STATIC_PATHS` (``['static']``) Static theme paths you want to copy. Default
|
||||
``THEME_STATIC_PATHS = ['static']`` Static theme paths you want to copy. Default
|
||||
value is `static`, but if your theme has
|
||||
other static paths, you can put them here. If files
|
||||
or directories with the same names are included in
|
||||
the paths defined in this settings, they will be
|
||||
progressively overwritten.
|
||||
`CSS_FILE` (``'main.css'``) Specify the CSS file you want to load.
|
||||
``CSS_FILE = 'main.css'`` Specify the CSS file you want to load.
|
||||
================================================ =====================================================
|
||||
|
||||
|
||||
By default, two themes are available. You can specify them using the `THEME` setting or by passing the
|
||||
``-t`` option to the ``pelican`` command:
|
||||
By default, two themes are available. You can specify them using the ``THEME``
|
||||
setting or by passing the ``-t`` option to the ``pelican`` command:
|
||||
|
||||
* notmyidea
|
||||
* simple (a synonym for "plain text" :)
|
||||
|
||||
There are a number of other themes available at http://github.com/getpelican/pelican-themes.
|
||||
There are a number of other themes available at https://github.com/getpelican/pelican-themes.
|
||||
Pelican comes with :doc:`pelican-themes`, a small script for managing themes.
|
||||
|
||||
You can define your own theme, either by starting from scratch or by duplicating
|
||||
|
|
@ -677,34 +675,34 @@ Following are example ways to specify your preferred theme::
|
|||
# Specify a customized theme, via path relative to the settings file
|
||||
THEME = "themes/mycustomtheme"
|
||||
# Specify a customized theme, via absolute path
|
||||
THEME = "~/projects/mysite/themes/mycustomtheme"
|
||||
THEME = "/home/myuser/projects/mysite/themes/mycustomtheme"
|
||||
|
||||
The built-in ``notmyidea`` theme can make good use of the following settings. Feel
|
||||
free to use them in your themes as well.
|
||||
|
||||
======================= =======================================================
|
||||
Setting name What does it do ?
|
||||
Setting name What does it do?
|
||||
======================= =======================================================
|
||||
`SITESUBTITLE` A subtitle to appear in the header.
|
||||
`DISQUS_SITENAME` Pelican can handle Disqus comments. Specify the
|
||||
``SITESUBTITLE`` A subtitle to appear in the header.
|
||||
``DISQUS_SITENAME`` Pelican can handle Disqus comments. Specify the
|
||||
Disqus sitename identifier here.
|
||||
`GITHUB_URL` Your GitHub URL (if you have one). It will then
|
||||
``GITHUB_URL`` Your GitHub URL (if you have one). It will then
|
||||
use this information to create a GitHub ribbon.
|
||||
`GOOGLE_ANALYTICS` 'UA-XXXX-YYYY' to activate Google Analytics.
|
||||
`GOSQUARED_SITENAME` 'XXX-YYYYYY-X' to activate GoSquared.
|
||||
`MENUITEMS` A list of tuples (Title, URL) for additional menu
|
||||
``GOOGLE_ANALYTICS`` Set to 'UA-XXXX-YYYY' to activate Google Analytics.
|
||||
``GOSQUARED_SITENAME`` Set to 'XXX-YYYYYY-X' to activate GoSquared.
|
||||
``MENUITEMS`` A list of tuples (Title, URL) for additional menu
|
||||
items to appear at the beginning of the main menu.
|
||||
`PIWIK_URL` URL to your Piwik server - without 'http://' at the
|
||||
``PIWIK_URL`` URL to your Piwik server - without 'http://' at the
|
||||
beginning.
|
||||
`PIWIK_SSL_URL` If the SSL-URL differs from the normal Piwik-URL
|
||||
``PIWIK_SSL_URL`` If the SSL-URL differs from the normal Piwik-URL
|
||||
you have to include this setting too. (optional)
|
||||
`PIWIK_SITE_ID` ID for the monitored website. You can find the ID
|
||||
in the Piwik admin interface > settings > websites.
|
||||
`LINKS` A list of tuples (Title, URL) for links to appear on
|
||||
``PIWIK_SITE_ID`` ID for the monitored website. You can find the ID
|
||||
in the Piwik admin interface > Settings > Websites.
|
||||
``LINKS`` A list of tuples (Title, URL) for links to appear on
|
||||
the header.
|
||||
`SOCIAL` A list of tuples (Title, URL) to appear in the
|
||||
``SOCIAL`` A list of tuples (Title, URL) to appear in the
|
||||
"social" section.
|
||||
`TWITTER_USERNAME` Allows for adding a button to articles to encourage
|
||||
``TWITTER_USERNAME`` Allows for adding a button to articles to encourage
|
||||
others to tweet about them. Add your Twitter username
|
||||
if you want this button to appear.
|
||||
======================= =======================================================
|
||||
|
|
@ -734,17 +732,17 @@ For example: ``[(logging.WARN, 'TAG_SAVE_AS is set to False')]``
|
|||
Reading only modified content
|
||||
=============================
|
||||
|
||||
To speed up the build process, pelican can optionally read only articles
|
||||
To speed up the build process, Pelican can optionally read only articles
|
||||
and pages with modified content.
|
||||
|
||||
When Pelican is about to read some content source file:
|
||||
|
||||
1. The hash or modification time information for the file from a
|
||||
previous build are loaded from a cache file if `LOAD_CONTENT_CACHE`
|
||||
is ``True``. These files are stored in the `CACHE_DIRECTORY`
|
||||
previous build are loaded from a cache file if ``LOAD_CONTENT_CACHE``
|
||||
is ``True``. These files are stored in the ``CACHE_DIRECTORY``
|
||||
directory. If the file has no record in the cache file, it is read
|
||||
as usual.
|
||||
2. The file is checked according to `CHECK_MODIFIED_METHOD`:
|
||||
2. The file is checked according to ``CHECK_MODIFIED_METHOD``:
|
||||
|
||||
- If set to ``'mtime'``, the modification time of the file is
|
||||
checked.
|
||||
|
|
@ -755,60 +753,60 @@ When Pelican is about to read some content source file:
|
|||
usual.
|
||||
|
||||
3. If the file is considered unchanged, the content data saved in a
|
||||
previous build corresponding to the file is loaded from the cache
|
||||
previous build corresponding to the file is loaded from the cache,
|
||||
and the file is not read.
|
||||
4. If the file is considered changed, the file is read and the new
|
||||
modification information and the content data are saved to the
|
||||
cache if `CACHE_CONTENT` is ``True``.
|
||||
cache if ``CACHE_CONTENT`` is ``True``.
|
||||
|
||||
Depending on `CONTENT_CACHING_LAYER` either the raw content and
|
||||
metadata returned by a reader are cached if set to ``'reader'``, or
|
||||
the processed content object is cached if set to ``'generator'``.
|
||||
Caching the processed content object may conflict with plugins (as
|
||||
some reading related signals may be skipped) or e.g. the
|
||||
`WITH_FUTURE_DATES` functionality (as the ``draft`` status of the
|
||||
If ``CONTENT_CACHING_LAYER`` is set to ``'reader'`` (the default),
|
||||
the raw content and metadata returned by a reader are cached. If this
|
||||
setting is instead set to ``'generator'``, the processed content
|
||||
object is cached. Caching the processed content object may conflict
|
||||
with plugins (as some reading related signals may be skipped) and the
|
||||
``WITH_FUTURE_DATES`` functionality (as the ``draft`` status of the
|
||||
cached content objects would not change automatically over time).
|
||||
|
||||
Modification time based checking is faster than comparing file hashes,
|
||||
but is not as reliable, because mtime information can be lost when
|
||||
e.g. copying the content sources using the ``cp`` or ``rsync``
|
||||
commands without the mtime preservation mode (invoked e.g. by
|
||||
``--archive``).
|
||||
Checking modification times is faster than comparing file hashes,
|
||||
but it is not as reliable because ``mtime`` information can be lost,
|
||||
e.g., when copying content source files using the ``cp`` or ``rsync``
|
||||
commands without the ``mtime`` preservation mode (which for ``rsync``
|
||||
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
|
||||
running pelican after removing them 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.
|
||||
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.
|
||||
|
||||
The ``--ignore-cache`` command-line option is also useful when the
|
||||
whole cache needs to be regenerated due to e.g. modifications to the
|
||||
settings file which should change the cached content or just for
|
||||
debugging purposes. When pelican runs in autoreload mode, modification
|
||||
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
|
||||
of the settings file will make it ignore the cache automatically if
|
||||
`AUTORELOAD_IGNORE_CACHE` is ``True``.
|
||||
``AUTORELOAD_IGNORE_CACHE`` is ``True``.
|
||||
|
||||
Note that even when using cached content, all output is always
|
||||
written, so the modification times of the ``*.html`` files always
|
||||
change. Therefore, ``rsync`` based upload may benefit from the
|
||||
``--checksum`` option.
|
||||
written, so the modification times of the generated ``*.html`` files
|
||||
will always change. Therefore, ``rsync``-based uploading may benefit
|
||||
from the ``--checksum`` option.
|
||||
|
||||
.. _writing_only_selected_content:
|
||||
|
||||
Writing only selected content
|
||||
=============================
|
||||
|
||||
When one article or page or the theme is being worked on it is often
|
||||
desirable to display selected output files as soon as possible. In
|
||||
such cases generating and writing all output is often unnecessary.
|
||||
These selected output files can be given as output paths in the
|
||||
`WRITE_SELECTED` list and **only** those files will be written. This
|
||||
list can be also specified on the command-line using the
|
||||
``--write-selected`` option which accepts a comma separated list
|
||||
of output file paths. By default the list is empty so all output is
|
||||
written.
|
||||
When only working on a single article or page, or making tweaks to
|
||||
your theme, it is often desirable to generate and review your work
|
||||
as quickly as possible. In such cases, generating and writing the
|
||||
entire site output is often unnecessary. By specifying only the
|
||||
desired files as output paths in the ``WRITE_SELECTED`` list,
|
||||
**only** those files will be written. This list can be also specified
|
||||
on the command line using the ``--write-selected`` option, which
|
||||
accepts a comma-separated list of output file paths. By default this
|
||||
list is empty, so all output is written.
|
||||
|
||||
Example settings
|
||||
================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue