1
0
Fork 0
forked from github/pelican
pelican-theme/pelican/tests
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
..
content Allows Typogrify to ignore user specified tags. Refs #1407 2014-07-28 15:17:12 -07:00
mixed_content Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
output Add timezone to datetime objects. Refs #962. 2014-07-04 01:23:57 +09:00
TestPages Add test for PAGE_ORDER_BY 2013-11-14 12:37:22 -08:00
__init__.py Fix for issue #392 2013-03-27 18:17:11 -04:00
default_conf.py added testing for default locale setting 2013-07-21 14:12:21 +08:00
support.py tests.support: Use kwargs overrides in get_settings() 2013-06-02 14:24:27 -04:00
test_contents.py Fix #1198, enable custom locale in template rendering, fixes links 2014-06-26 00:00:19 -04:00
test_generators.py Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
test_importer.py Make sure locale is what we want before/after the tests 2014-04-15 16:45:45 +02:00
test_paginator.py Make sure locale is what we want before/after the tests 2014-04-15 16:45:45 +02:00
test_pelican.py Make StaticGenerator skip content sources. Refs #1019. 2014-10-31 16:46:01 -07:00
test_readers.py Allows Typogrify to ignore user specified tags. Refs #1407 2014-07-28 15:17:12 -07:00
test_settings.py Add {PAGE,ARTICLE}_PATHS to {ARTICLE,PAGE}_EXCLUDES automatically 2014-05-14 14:30:21 +02:00
test_utils.py Merge pull request #1446 from avaris/enhanced_strftime 2014-08-28 11:17:28 -07:00