1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
Forest 48f4f0850d Make StaticGenerator skip content sources. Refs #1019.
This change partially addresses issue #1019, by teaching Pelican to distinguish
between static files and content source files. A user can now safely add the
same directory to both STATIC_PATHS and PAGE_PATHS (or ARTICLE_PATHS). Pelican
will then process the content source files in that directory normally, and
treat the remaining files as static, without copying the raw content source
files to the output directory. (The OUTPUT_SOURCES setting still works.)

In other words, images and markdown/reST files can now safely live together.

To keep those files together in the generated site, STATIC_SAVE_AS and
PAGE_SAVE_AS (or ARTICLE_SAVE_AS) should point to the same output directory.

There are two new configuration settings:

STATIC_EXCLUDES=[]  # This works just like PAGE_EXCLUDES and ARTICLE_EXCLUDES.
STATIC_EXCLUDE_SOURCES=True  # Set this to False to get the old behavior.

Two small but noteworthy internal changes:

StaticGenerator now runs after all the other generators. This allows it to see
which files are meant to be processed by other generators, and avoid them.

Generators now include files that they fail to process (e.g. those with missing
mandatory metadata) along with all the other paths in context['filenames'].
This allows such files to be excluded from StaticGenerator's file list, so they
won't end up accidentally published. Since these files have no Content object,
their value in context['filenames'] is None. The code that uses that dict has
been updated accordingly.
2014-10-31 16:46:01 -07:00
..
tests Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
themes Run tag name through escape filter to avoid invalid HTML 2014-02-18 15:01:31 +01:00
tools fix missing tab in Makefile template 2014-10-20 15:22:11 +02:00
__init__.py Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
contents.py Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
generators.py Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
log.py Refactor logging handling 2014-07-22 12:39:39 -04:00
paginator.py Refactor logging handling 2014-07-22 12:39:39 -04:00
readers.py Fixes #1420: Handle multiple definitions of standard metadata for Markdown 2014-08-22 17:53:36 -04:00
rstdirectives.py Support for pygment defaults and relevant documentation 2013-09-15 23:13:17 -07:00
server.py Refactor logging handling 2014-07-22 12:39:39 -04:00
settings.py Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
signals.py Add feed_written signal 2014-08-28 20:09:42 +02:00
urlwrappers.py Refactor logging handling 2014-07-22 12:39:39 -04:00
utils.py Merge pull request #1348 from vjousse/davidmarble-page-order-by 2014-09-18 16:12:51 -07:00
writers.py Merge pull request #1366 from Scheirle/paginated_relative_urls_fix2 2014-09-18 16:15:21 -07:00