Live data from Hacker News

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

wp2hugo.blogdb.org

41–45 of 45 posts

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

#41

Earlier quoted context omitted.

Makes sense, you're right. I'm glad this single-use static file converter is $150. Thank you.

Pricing and product market fit discovery is a process. Solve the problem, make it maintainable, make it perform. You are on a VC startup accelerator funded forum where a component is encouraging makers and builders to solve problems (sometimes, for money), after all. Encouragement and constructive feedback is both cheap and kind.

[flagged]

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

#42

Earlier quoted context omitted.

You copy it into the same directory as the post you want to put it in, and reference it as a resource from your post. I made a shortcode for this for my own Hugo site, adding auto thumbnailing & WebP support: https://gist.github.com/lewiscollard/c6651648d1c20144ed89e16... Copy that into your "layouts/shortcodes/image.html" and use it as {{ }} If you just want to upload it to _not_ reference it in a post/page, copy it…

Plain old markdown image syntax also works, although there is no way to preprocess the file or add any additional HTML attributes beyond what you see here: ![add a description here](my cat.jpg)

Yep, that works too. I wrote the shortcode because I didn't want to have to manually resize pictures. That's effort and it means if I change my layout to require wider pictures I have to go find the originals.

I think you could do this with a render hook if you want to get fancy (with the benefit that the Markdown for your posts stays as plain Markdown): https://werat.dev/blog/automatic-image-size-attributes-in-hu...

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

#43
post #27

That's pretty cool! I ported my own WP blog to a static site generator (my own but with a format inspired by Hugo) a while back and hacked together a script with wpparser and some custom code to spit out markdown (it was a while back but I think just regexes). It got me the bulk of the way there but I still had to go through every page and tweak it to get everything just right. Would happily have paid $150 to avoid t…

I actually did write this up if it helps anyone... I did something similar, my WordPress site only had ~100 pages, so I just put the page map in a table in the js: https://www.hotelexistence.ca/something-mildly-different/ (my ?p=### script is near the bottom)

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

#44
post #27

That's pretty cool! I ported my own WP blog to a static site generator (my own but with a format inspired by Hugo) a while back and hacked together a script with wpparser and some custom code to spit out markdown (it was a while back but I think just regexes). It got me the bulk of the way there but I still had to go through every page and tweak it to get everything just right. Would happily have paid $150 to avoid t…

> so I wound up putting some JS in my index page template that checks for that kind of thing. If we are going to use JS, then you might as well put the redirects themselves in JS. Have a tiny stub of JS that detects the "/?p=xxx" case, which can then load the (presumably very large) list of redirects from a separate file and do the redirecting. That'll save you maintaining the extra service. As for me, I moved from a…

That's a nifty idea! I need the extra Flask for some other unrelated stuff, so it's OK as it is, but if it was on GH pages (like you say) that would be super useful.
Post reply on HN