Closed AvantaR closed 8 months ago
@lonekorean any chance to look at my PR? :smile:
@AvantaR is this work on your side?
@AvantaR is this work on your side?
It did.
Hello @AvantaR ! Sorry it took me 3 years to respond.
I think getting a slug out of post.link
may have worked for you, but would not work for everyone (for example, if someone has year/month in their post link paths, they would be included in the "slug").
I have rearchitected things a bit and added support for slug here: https://github.com/lonekorean/wordpress-export-to-markdown/pull/111
Just wanted to let you know why I'm closing this PR and to say thank you. 🙏
Hi!
While moving my blog from WordPress to Hugo, I ran to issue with slug. This tool doesn't export slug from WordPress link section, so if you have a different slug than your post title, some URLs could not work after migration.
In this PR, I've added support for it: – slug is pulled out from link attribute in post object – it's optional (default it's disabled) – to turn it on, just add --slug=true argument in CLI, or proper answer to wizard question ;)
I needed to change a bit your map function, hope it's still clear to read.
I think it can be quite helpful feature for other developers.
Thank you for this tool, it's awesome and speeds up migration so much!