palaniraja / blog2md

Convert Blogger & Wordpress backup blog posts to hugo compatible markdown documents
160 stars 43 forks source link

Post front matter #15

Open jaredmo opened 4 years ago

jaredmo commented 4 years ago

This is more of a question than an issue. I ran this variation of the script: node index.js w your-wordpress-backup-export.xml out m

However, the front matter in the output looks different than what I am used to seeing for Hugo. Is there a way to generate TOML front matter rather than YAML?

Expected:

+++
date = "2011-02-07T14:30:43+00:00"
title = "First Post"
draft = false
tags = ['Fun', 'News']
+++

Output:

---
title: 'First Post'
date: Mon, 07 Feb 2011 14:30:43 +0000
draft: false
tags: ['Fun', 'News']
---
haverholm commented 4 years ago

I'll have to second this: converted 1000+ posts from a Wordpress xml to use the MD files in Hugo, but the front matter doesn't parse. It appears to be a mashup of YAML and TOML. Compare the example output in @jaredmo 's post to Hugo's documentation examples.

Secondly, as I posted in a separate issue, the conversion script doesn't output categories, which I used more consistently than tags in WP :/