mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix building asciidoc headers in importer & add docs
This commit is contained in:
parent
5365a1cdb3
commit
86ff02541f
2 changed files with 5 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue