From 4167087e380b7873d9a67425327cc35bb8b7d4a4 Mon Sep 17 00:00:00 2001 From: icyleaf Date: Wed, 24 Apr 2013 11:47:05 +0800 Subject: [PATCH] fixed slug would not work --- pelican/tools/pelican_article.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pelican/tools/pelican_article.py b/pelican/tools/pelican_article.py index 7dcdf5dc..5df1681e 100644 --- a/pelican/tools/pelican_article.py +++ b/pelican/tools/pelican_article.py @@ -21,10 +21,10 @@ def create_template(args): exit(error) title = args.title.decode('utf-8') - slug = slugify(title) + slug = args.slug if args.slug else slugify(title) date = datetime.datetime.now().strftime("%Y-%m-%d %H:%M") - categories = args.categories.split('\W+') if args.categories else None - tags = args.tags.split('\W+') if args.tags else None + categories = args.categories.split('\W+') if args.categories else '' + tags = args.tags.split('\W+') if args.tags else '' if (args.markup == 'markdown') or (args.markup == 'md') : ext = '.md'