mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Revert to the old category processing order
If no category is specified in PATH_METADATA or FILENAME_METADATA, fall back to USE_FOLDER_AS_CATEGORY, which defaults to True.
This commit is contained in:
parent
9185e0b7a8
commit
0f6b98506e
1 changed files with 1 additions and 1 deletions
|
|
@ -659,7 +659,7 @@ def parse_path_metadata(source_path, settings=None, process=None):
|
||||||
('PATH_METADATA', source_path)]:
|
('PATH_METADATA', source_path)]:
|
||||||
checks.append((settings.get(key, None), data))
|
checks.append((settings.get(key, None), data))
|
||||||
if settings.get('USE_FOLDER_AS_CATEGORY', None):
|
if settings.get('USE_FOLDER_AS_CATEGORY', None):
|
||||||
checks.insert(0, ('(?P<category>.*)', subdir))
|
checks.append(('(?P<category>.*)', subdir))
|
||||||
for regexp, data in checks:
|
for regexp, data in checks:
|
||||||
if regexp and data:
|
if regexp and data:
|
||||||
match = re.match(regexp, data)
|
match = re.match(regexp, data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue