Wp2hugo: Best WordPress to Hugo migrator (written in Go)
github.com
github.com
(Pulling from the API also means you won’t have to inject any code into your current WP instance.)
Further, working offline on a single file makes the whole process hermetic. I needed that to build and improve `wp2hugo`.
I like Hugo, Gatsby, Ghost, Jekyll, and alike, but ever try to explain how to manage it to a machinist?
If there is one out there, please let me know.
So you make dev.yourdomain.example.com and block it from basically everything, client logs in the there and does the needful, and then when done hits "publish" and the plugin writes out a static site to example.com
These are several issues that forced me to write `wp2hugo` for migrating my personal website.
I switched to Kirby as a result of that, not static but simple php and file based.
- https://github.com/ArtalkJS/Artalk
- https://github.com/umputun/remark42/I probably could have tweaked it for my own purposes, but with only 100 posts, I just reviewed every one. It probably took me a few evenings to get everything looking right following the conversion.
This is licensed under CC BY-NC-SA 4.0. How does it apply here? If I migrate my commercial blog, will the license apply to generated contents?
It seems like the author wants to prevent commercial use of the software:
> I want this project to be as widely accessible as possible, while still funding the development costs. This project is completely free for non-commercial and personal usage. Commercial usage is restricted via a license. Feel free to contact me if you want to license this commercially
You're not permitted to use the tool to migrate your commercial blog. This is why BY-NC is not considered a free license in the most common definition of the term.
However, this license does not apply to the generated output. It only applies to the work the license is attached to. It's not a viral license in that sense. You can migrate your blog and later turn it into a commercial enterprise without risking copyright violations.
If you want to migrate your commercial blog, you should ask the author. They can license their code under any license they choose, so they could sell or give you a copy licensed such that you are legally permitted to use it commercially.
Makes sense. Yeah, the license is probably appropriate then. Thanks for the explanation!
I looked at 10+ tools and tried them on my personal blog, all got the basics right but none did great work for the 300+ posts that I have. You can see the features here https://github.com/ashishb/wp2hugo#goals-of-wp2hugo
> If I migrate my commercial blog, will the license apply to generated contents?
Lots of individuals have personal non-commercial websites and my goal was to give them a free tool to migrate out from WordPress -> Hugo (or even a static site, in general).
I hope it is fair to say that the original author of the code deserves to capture some value for the commercial migrations.
1. Hugo does not allow custom fonts - it leaves it to themes 2. Controlling many aspects of UI is really hard while having an abstract theme
I do not like modifying some files but I could not figure out a better way to do it without modifying a few files. Feel free to send a PR or suggest a better approach.
Edit: wait a sec
checks repository
11 years old, 77k stars.
The tech world is too big.
Hugo looks at that and generates some HTML that you then need to somehow serve yourself.
It has some positives and negatives with respect to WordPress. Mostly, unlike WordPress, you don't have auth (authentication AND authorization) within the system itself, but have some access to some repo+some CI system+some upload system+some HTTP server through.... some other means.
Had the same realization today.
Hugo was my first introduction to the idea of static site generators.
That got me thinking what other tools pre-dated it and then I found this excellent series on the evolution of SSGs [1].
The only name I recognize in there is Jekyll !!
1. https://cloudcannon.com/blog/ssg-history-1-before-jekyll/
That's a big advantage and is good to know for the users.
- easy distribution (like "go install")
- minimal dependencies, tests and thus stability and security (like go ecosystem)
- cross platform support
- source code proxies by Google, checksums, and prevention of attacks (thanks to security of go ecosystem)
overall, I would very much prefer some well done Go tool rather say Python, Javascript or binaries
- easy distribution (like "go install"): composer install works the same way.
- minimal dependencies, tests and thus stability and security (like go ecosystem): the packagist/PHP ecosystem is of very high quality in general, packages tend to have few dependencies, and have solid test coverage.
- cross platform support: PHP runs virtually everywhere.
- source code proxies by Google, checksums, and prevention of attacks (thanks to security of go ecosystem): Packagist might not be served directly by Google, but the entire infrastructure is built around GitHub, where published artifacts map to the source files on GitHub 1:1; so you can trust on Git refs as checksums.
That was not what the parent post required, is also besides the point, and I wouldn’t recommend it. Go is a fine language, especially for standalone applications.
But downright dismissing PHP as obviously worse than Go doesn’t do another very fine language justice. PHP is capable of quite a lot really, is fast as heck, has an amazing ecosystem, and carries you all the way from quick prototype to stable production workload.
And yes: a tool to migrate a blog is something it effortlessly handles.
From what you explained, PHP is good choice here too then.
For a Python/TS tool, the user needs the dev environment to run it. For a Go/Rust/C++ tool, the user does not need the dev environment to install it.