I have not yet found any such implementation or solution, but here’s my point. Many blogs/ websites etc have been using WordPress for a while due to its widespread popularity and Hugo (or any SSG) not being as popular as WP. Since I got to know about Hugo, I see it to be a great option for building several types of websites instead of WordPress hence this question.
I am quite aware that Netlify and Strapi can be used as Headless CMS for Hugo, but can WordPress be also used for it? Is there any solution/implementation or are there any plans in this direction?
Should this be available, this would make it so easy for anybody to migrate from WordPress to a Hugo website (Hugo frontend + WP CMS backend) while still being able to manage the content using WordPress
@Regis has a ‘recipe’ for how to get info from an API, such as the WP API. With an extra build step you can generate all content from the WP API (if I understand it correctly). @Regis, would you like to join in here?
Hi sorry I’m seeing this so late.
I’ve never tried and build a whole website from WP because this is not project I usually take on.
Knowing WP and it’s API it will not be an easy task, as relationships will be tricky to establish but following this shared blog post along with this series: Hugo Data, a series | The New Dynamic
There is nothing stopping you.
If I take on a WP + Hugo project one day, I’ll definitely write a blog post about it.
Wow, I never tried this before but as an alternative I suggest you you use CMS backend that generate flat file (perhaps in markdown) then you can use the files as hugo content.
Well i did it a couple of years ago, created the Wordpress headless, and multilingual also. Then used gatsby-markdown-export, (GitHub - tinacms/wp-gatsby-markdown-exporter: Export WordPress content to Markdown for GatsbyJS.) thru wp-cli as follows:
php /wp-cli.phar gatsby-markdown-export --path=/blabla.com/headless/ --directory=/blabla.com/content/english/ --post_types=articles,team,media,page,testimonials,practice-areas --post_status=publish --remap_fields=category,categories
then copies generated content to hugo folders, and generated hugo site.
Worked like a charm although a bit complicated to setup initially. But is was lockdown days and had nothing better to do
Not thinking of WordPress but more using Discourse with a blog category and pushing this category through a static site with hugo more or less they explain here, by using: .json and include_raw=true
Do you think I’m going in the right rabbit hole, it would work ?
Suggest a build script that pulls down your content with curl. Probably
https://discourse.url/admin/backups/derka?with_uploads=true
or similar.
Now possible with content adaptors