mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
enable writing of only selected output paths
- add WRITE_SELECTED setting - add --write-selected commandline option
This commit is contained in:
parent
34ef5ab098
commit
6703950abe
7 changed files with 81 additions and 2 deletions
|
|
@ -224,3 +224,8 @@ every time, so a ``rsync`` based upload will transfer them even if
|
|||
their content hasn't changed. A simple solution is to make ``rsync``
|
||||
use the ``--checksum`` option, which will make it compare the file
|
||||
checksums in a much faster way than Pelican would.
|
||||
|
||||
When only several specific output files are of interest (e.g. when
|
||||
working on some specific page or the theme templates), the
|
||||
`WRITE_SELECTED` option may help, see
|
||||
:ref:`writing_only_selected_content`.
|
||||
|
|
|
|||
|
|
@ -179,6 +179,10 @@ Setting name (default value)
|
|||
`CHECK_MODIFIED_METHOD` (``mtime``) Controls how files are checked for modifications.
|
||||
`LOAD_CONTENT_CACHE` (``True``) If ``True``, load unmodified content from cache.
|
||||
`GZIP_CACHE` (``True``) If ``True``, use gzip to (de)compress the cache files.
|
||||
`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`.
|
||||
=============================================================================== =====================================================================
|
||||
|
||||
.. [#] Default is the system locale.
|
||||
|
|
@ -774,6 +778,21 @@ written, so the modification times of the ``*.html`` files always
|
|||
change. Therefore, ``rsync`` based upload 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.
|
||||
|
||||
Example settings
|
||||
================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue