mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Don't force the number of categories to be equal to 1. Fixes #521
This commit is contained in:
parent
7892c33ec9
commit
9add2151c3
1 changed files with 1 additions and 1 deletions
|
|
@ -216,7 +216,7 @@ def fields2pelican(fields, out_markup, output_path, dircat=False, strip_raw=Fals
|
|||
filename = os.path.basename(filename)
|
||||
|
||||
# option to put files in directories with categories names
|
||||
if dircat and (len(categories) == 1):
|
||||
if dircat and (len(categories) > 0):
|
||||
catname = slugify(categories[0])
|
||||
out_filename = os.path.join(output_path, catname, filename+ext)
|
||||
if not os.path.isdir(os.path.join(output_path, catname)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue