HackerTrans
TopNewTrendsCommentsPastAskShowJobs

symkat

no profile record

Submissions

Show HN: I made a tool to help you save and execute commands in a directory

github.com
4 points·by symkat·в прошлом году·2 comments

Show HN: I made a service to convert WordPress blogs to Hugo

wp2hugo.blogdb.org
98 points·by symkat·в прошлом году·42 comments

comments

symkat
·4 месяца назад·discuss
I've been working on https://blogdb.org/ recently.

I originally made it a couple of years ago as a small proof of concept. A couple of weeks ago I started it over and have been using it as a project to work with Claude and learn approaches to coding with AI.

It's been a lot of fun.
symkat
·в прошлом году·discuss
Thank you for saying so!

That's super awesome too, this is not so different under the hood, I used libxml for getting the content and pandoc for converting -- pandoc turned out to be by far the best of the tools I tried for that aspect.

It won't necessarily keep the URLs stable, they'll be made based on the title of the post.

That's a cool solution for the ?p=<id> issues, this doesn't handle it but when I've done it for for sites I host I usually use nginx's rewrite rules. I think for query rewriting you need to additionally use the map directive, but I was only handling directory vs .html and things like that.

Thank you again for commenting, I like your site!
symkat
·в прошлом году·discuss
Thank you for commenting!

It does put your files into a Hugo directory structure and includes the smol theme. It doesn't recreate your theme, plugins, or process your images, but I also have tried to be very explicit that it just converts your pages and posts and is the starting point for a conversion.

When you put an export file through it, you'll end up on this page: https://imgur.com/a/UUMB6ve where you can download a zip or tgz of the site and you'll clearly understand what you're getting before you can choose if you want to have the remaining pages/posts converted.
symkat
·в прошлом году·discuss
I totally agree. This came about because of a pretty expensive quote the person I was talking to got.
symkat
·в прошлом году·discuss
Thank you for commenting!

Really the reason I picked Hugo is because that's what the person I was talking to wanted. He'd only found contractors who would charge more than he wanted to pay to do a manual conversion, and said even something that just got his pages and posts over would be worthwhile to him.

I have more experience with Jekyll. In fact, I had tried to start a hosted platform with a CMS for it that I opened sourced a while back (https://github.com/symkat/MyJekyllBlog) but it never really got traction.

At this point I'm actively looking for a new job and figured getting this on Hacker News might be helpful for that.

I hadn't heard of Astro before, it looks neat!
symkat
·в прошлом году·discuss
In my case, at least a big part of it is I'm looking for a job again and doing something like this to get myself out there, I already had one person who was interested in this specific type of conversion so maybe there are others.

Thanks for the 413 note! I've just upped the client_max_body_size if you want to give it a try again.
symkat
·в прошлом году·discuss
It does not, it converts just the blog posts and pages to help you get started on a conversion. It gives you the smol theme by default and the page that gives you access to the downloads gives additional information for finding themes at https://themes.gohugo.io/
symkat
·в прошлом году·discuss
You're right, Hugo is for static sites! Hugo does support comments through things like Disqus (https://gohugo.io/content-management/comments/).

My service only converts the blog posts and pages themself and helps you get started on a conversion.