decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.81k stars 3.04k forks source link

Feature request: Wordpress import #665

Closed raae closed 6 years ago

raae commented 6 years ago

I have years of blog posts in WordPress and would love to switch over to the Netlify CMS, but manually importing them all would be a pain. I am guessing this is the same for many other users.

Important for me:

I can live with small errors in the formatting as I am guessing html to markdown can be error-prone.

A bonus would be importing advanced custom fields as well, building up the same content model based on the import.

I am guessing it might not be your first priority, just wanted to get this need communicated.

tech4him1 commented 6 years ago

@raae Netlify CMS is just a content editor (a headless CMS), it doesn't actually deal with making your content into a website. You must use a static site generator or some other sort of build tool to actually create the site. If you have decided on a static site generator, have you checked to see if it has an import tool? We are working on a tool to generate your CMS editor config (https://github.com/netlify/netlify-cms/issues/322), but that will only work after you already have the site converted into markdown. Does that make sense?

erquhart commented 6 years ago

@biilmann created a tool for this to support Smashing's migration from Wordpress to Hugo, and there's a Jekyll exporter that might get you close to your target as well.

Not certain how up to date the Hugo tool is, honestly, but it's here: https://github.com/netlify/make-wp-epic

Jekyll tool, which isn't by us, but looks fairly well maintained, is here: https://github.com/benbalter/wordpress-to-jekyll-exporter

But yeah, as @tech4him1 noted, you'll ideally go from Wordpress straight to a static site generator, and would generally want to find the best path for your particular SSG. Netlify CMS should really adapt to whatever SSG you choose once migration is finished, and doesn't actually have a role in the process.

Feel free to hop in Gitter with any other questions on this!

raae commented 6 years ago

I know it is a headless CMS. I would like all my posts converted into markdown I can continue to edit in Netlify CMS, even before deciding on an SSG @tech4him1.

I will have a look at some of the SSG specific ones you mentioned @erquhart.

tech4him1 commented 6 years ago

@raae The problem is that the CMS has no idea how you are going to want the markdown and front-matter formatted, as that will depend on your SSG. The format used by Jekyll is pretty widely supported, so you may just be able to use the WordPress Jekyll exporter that @erquhart mentioned above.

paulkn commented 6 years ago

Gatsby.js may be the best option now. It uses GraphQL to pull in data from Wordpress or many other sources and is compatible with NetlifyCMS as well. See here for more info: https://www.gatsbyjs.org/tutorial/part-four/#transformer-plugins