From d6050d829b25361155ccc70d8794dbca63561650 Mon Sep 17 00:00:00 2001 From: Florent Gallaire Date: Mon, 30 Oct 2017 18:58:58 +0100 Subject: [PATCH] WP import: Category is categories[0] Same behaviour as --dir-cat Fix part of #2239 --- pelican/tools/pelican_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 25fc45e5..5a2954a6 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -523,7 +523,7 @@ def build_header(title, date, author, categories, tags, slug, if author: header += ':author: %s\n' % author if categories: - header += ':category: %s\n' % ', '.join(categories) + header += ':category: %s\n' % categories[0] if tags: header += ':tags: %s\n' % ', '.join(tags) if slug: @@ -545,7 +545,7 @@ def build_markdown_header(title, date, author, categories, tags, if author: header += 'Author: %s\n' % author if categories: - header += 'Category: %s\n' % ', '.join(categories) + header += 'Category: %s\n' % categories[0] if tags: header += 'Tags: %s\n' % ', '.join(tags) if slug: