also ensure a blank line at the end of file
This commit is contained in:
parent
c33d90547a
commit
42fd528b22
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
/venv/
|
/venv/
|
||||||
/output/
|
/output/
|
||||||
|
*.xml
|
||||||
|
@ -42,7 +42,7 @@ for item in items:
|
|||||||
content = re.sub(r'<!-- \/?wp:.+?\s*-->', '', content)
|
content = re.sub(r'<!-- \/?wp:.+?\s*-->', '', content)
|
||||||
content = re.sub(r'<!--more-->', '<p class="more">:::more:::</p>', content)
|
content = re.sub(r'<!--more-->', '<p class="more">:::more:::</p>', content)
|
||||||
content = '\n'.join([s.strip() for s in content.splitlines() if s.strip()])
|
content = '\n'.join([s.strip() for s in content.splitlines() if s.strip()])
|
||||||
content = md(content).strip()
|
content = md(content).strip() + '\n'
|
||||||
frontmatter = f"---\nlayout: {post_type}\nid: {post_id}\ntitle: \"{title}\"\ncreator: \"{creator}\"\ndate: {date}\ncategories:\n{categories}\ntags:\n{tags}\ndraft: {'yes' if status == 'draft' else 'no'}\n---\n\n"
|
frontmatter = f"---\nlayout: {post_type}\nid: {post_id}\ntitle: \"{title}\"\ncreator: \"{creator}\"\ndate: {date}\ncategories:\n{categories}\ntags:\n{tags}\ndraft: {'yes' if status == 'draft' else 'no'}\n---\n\n"
|
||||||
|
|
||||||
title_slug = slugify(title)
|
title_slug = slugify(title)
|
||||||
|
Loading…
Reference in New Issue
Block a user