diff --git a/docs/importer.rst b/docs/importer.rst index 88588d17..b8313f49 100644 --- a/docs/importer.rst +++ b/docs/importer.rst @@ -74,8 +74,8 @@ Optional arguments -o OUTPUT, --output OUTPUT Output path (default: content) -m MARKUP, --markup MARKUP - Output markup format (supports rst & markdown) - (default: rst) + Output markup format: ``rst``, ``markdown``, or ``asciidoc`` + (default: ``rst``) --dir-cat Put files in directories with categories name (default: False) --dir-page Put files recognised as pages in "pages/" sub- @@ -140,4 +140,4 @@ To test the module, one can use sample files: - for WordPress: https://www.wpbeginner.com/wp-themes/how-to-add-dummy-content-for-theme-development-in-wordpress/ - for Dotclear: http://media.dotaddict.org/tda/downloads/lorem-backup.txt -.. _more_categories: https://github.com/getpelican/pelican-plugins/tree/master/more_categories \ No newline at end of file +.. _more_categories: https://github.com/getpelican/pelican-plugins/tree/master/more_categories diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 77226cd3..f9a53dbd 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -571,12 +571,11 @@ def build_header(title, date, author, categories, tags, slug, header += '\n' return header + def build_asciidoc_header(title, date, author, categories, tags, slug, status=None, attachments=None): """Build a header from a list of fields""" - from docutils.utils import column_width - header = '= %s\n' % title if author: header += '%s\n' % author @@ -802,7 +801,7 @@ def fields2pelican( ext = get_ext(out_markup, in_markup) if ext == '.adoc': header = build_asciidoc_header(title, date, author, categories, - tags, slug, status, attached_files) + tags, slug, status, attachments) elif ext == '.md': header = build_markdown_header( title, date, author, categories, tags, slug,