A small update about this since @texnixe mentioned it in this topic. It’s waaaay more complicated than I thought for a good number of reasons. First I could not find a way to change clickable images to the kirby text syntax.
I thought it would be bad to let html in but that was before I started working with a complicated website that has a lot of posts containing a lot of text formating. To sum it up, sometimes the wordpress editor is doing nonsense and keep some empty html (like center, bold, etc) inside the posts and you can only see them in the code editor. When you make the export to kirbytext, it can completly mess your file and the page will not load. I found old posts with an empty bold html tag adding **** during the export and even more nonsense.
So knowing that, I think that the best “safe” route will be to not convert the html to kirbytext at all. Most of the posts being exported for a conservative purpose, I think that’s for the better to prefer readable and working pages instead of “almost but not totally exported” files.
There’s also the topic of the age of the wordpress install. Before wordpress used oembed you had to use a third party embed or the iframe from youtube for example. Cases like this are legion and a real mess.
And there’s another problem with the hyperlinks. Most of the time people use either the basic p=1 model or the /year/month/day/topic model and you can’t do this as kirby will believe you are talking about folders. Exporting urls this way creates three subfolders with articles in it and that would make using the kirby panel a nightmare (and let’s not talk about folder numbers ). What I’m trying to say is that, even if we manage to export correctly the posts, we’ll also have to work on a redirection solution for most cases.
So in the end, I think there can’t be a single perfect solution to migrate to Kirby. Each wordpress install is different and outside of the recent and well managed wordpress installs with basic content, you’ll have to modify the exporter.
I’ll update the topic once I’m done exporting my websites and propose the exporter I used. Maybe we can work on a file with different cases in it and let the user choose what matches his install. Maybe we can also work on an .htaccess for urls.
Anyway, it’s going to be a bit longer that I wanted.