Fix building asciidoc headers in importer & add docs

This commit is contained in:
Justin Mayer 2020-04-16 08:01:10 +02:00
commit 86ff02541f
2 changed files with 5 additions and 6 deletions

View file

@ -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,