forked from github/pelican
The old code was naively comparing the strings in PAGE_EXCLUDES to the subdirectory names produced by os.walk(). (Same with ARTICLE_EXCLUDES.) This had two surprising effects: Setting PAGE_EXCLUDES=['foo'] would exclude all directories named foo, regardless of whether they were in the top-level content directory or nested deep within a directory whose contents should not be excluded. Setting PAGE_EXCLUDES=['subdir/foo'] would never exclude any directories. In other words, there is no way to exclude a subdirectory without risking the accidental exclusion of other directories with the same name elsewhere in the file system. This change fixes the problem, so 'subdir/foo' and 'foo' will be distinct and both work as expected. If anyone out there is depending on the old behavior, they will have to update their settings. I don't expect it to affect most users yet, since Pelican doesn't yet make nested directory structures very useful. When it does, this fix will become important to more people. |
||
|---|---|---|
| .. | ||
| content | ||
| mixed_content | ||
| nested_content/maindir | ||
| output | ||
| TestPages | ||
| __init__.py | ||
| default_conf.py | ||
| support.py | ||
| test_contents.py | ||
| test_generators.py | ||
| test_importer.py | ||
| test_paginator.py | ||
| test_pelican.py | ||
| test_readers.py | ||
| test_settings.py | ||
| test_utils.py | ||