Headless Hugo CMS

I’m a developer, I really like Hugo’s way to help me manage my content with MD on-prem.

And I want to use my content in different way, not just browser, but also native app, smart device, etc.

Is there any plan in Hugo’s roadmap related to those approach?

Thanks

Checked Hugo live road map, I assume there is no priority for Hugo headless CMS, let’s have a try to build it ourself.

2 Likes

You can use the json output of Hugo to get your posts as a JSON object - just like you would from an API.

I believe enableing it like this in your config.toml (of your Hugo project):

[outputFormats.JSON]
mediaType = "application/json"
section = ["HTML", "RSS", "JSON"]
pages = ["HTML", "RSS", "JSON"]
home =  ["HTML", "RSS", "JSON"]

See this article or Hugo Docs for more info.

1 Like

Thanks a lot, that’s really a great idea. I will following this way to read the source code. What I want to try is to make it as a backend server and support client like React/Vue/Svelte for SPA/PWA, which will need some details info, so that I can build HUGO content in other services.

1 Like

Updates:

Related: What is the best Open Source CMS for HUGO?

Thanks for sharing. My goal is not to create another headless CRM or help people to migrate from Hugo. Instead, I aim to extend Hugo’s open-source code and turn it into a hugo native headless CRM, make hugo support static plus dynamic in the future to enrich the ecosystem of this outstanding open-source project.

1 Like

This sounds pretty cool and convenient. Unfortunately, I don’t have enough time at the moment (maybe later this year) to get into these things. So, I’ll have a look from time to time just to follow up. Good luck and happy coding :slight_smile:

Just a quick update. At present, the source code has been sorted out by using DDD (Domain Driven Design), as shown in the domain model diagram below. The whole process took longer than I expected. Hugo is so powerful, with many functions and more details. And I believe that’s why Hugo attracts so many contributors and users. For next step, I will get into API design phase. You can also help with some application scenarios to verify how to abstract the API.

Here is the SVG version for detail info.

One understanding is enough. Reading the Hugo open-source code is quite time-consuming. I’ll continue updating, even at a possibly slower pace. :slight_smile:

Quick update, try to start with this scenarios:

Use Hugo API to build a online book service

It’s been exactly a year since I first posted here in September 2023, and I’m excited to come back with an update! I’m happy to report that I didn’t go back on my word — the proof of concept (PoC) is up and running!

The PoC now supports the following workflow:

  1. Load a Hugo project into the CMS via a command line interface.
  2. Add a new post to the project using an API.
  3. Build the site using an API.
  4. Deploy the site to Netlify via an API.

This is just a simple update as I wanted to share something before the end of September. Next, I’ll be preparing a detailed demo to help introduce the full functionality. Coming soon…

1 Like

Demo is here:

Hugoverse PoC Demo

1 Like

Looks promising. Best wishes.

Thanks

More details - Demo

@sunwei, looks really interesting.

Is there any alpha/beta access, or is is it too early to have this in the wild for testing ?
Seems really promising for a lot of use case.

Thank you for your interest!

I’ve developed an Obsidian plugin called Friday. The backend service powering this plugin is provided by Hugoverse, an open-source project like Hugo. Friday helps you turn your Obsidian notes into a full website by applying Hugo themes (with some adaptations). It streamlines the process of generating and deploying sites directly from your notes.

It’s still in active development, but I’m planning to release it soon for testing. If you’re interested, I’d be happy to share updates as the project progresses!

Friday link: GitHub - mdfriday/obsidian-friday-plugin: Turn notes to website, in minutes. MDFriday plugin for Obsidian.
Hugoverse link: GitHub - gohugonet/hugoverse: Hugo headless CMS server

2 Likes

Looks interesting so far, I’ve stopped to check out TinaCMS, and I’m thinking of using it with Hugo for my next site. Usually, the problems start later, especially when dealing with additional fields like a WYSIWYG editor or an OpenStreetMap field. As soon as you go beyond standard text, title, and tags, things get tricky. Anyway, it looks great, good job! I think there will be people who find this interesting.

Thank you for sharing your practical experience—it’s truly helpful! I appreciate your insights into WYSIWYG editors and OpenStreetMap fields.

My vision for Hugoverse is to create a Headless CMS that combines Hugo with Ponzu, focusing on seamless site rendering. The foundation remains Markdown syntax, and I plan to offer tailored support based on the tools users use. For example, I started with Obsidian, and I’ve developed a plugin called Friday. Friday helps users manage their notes within Obsidian and uploads them via APIs to Hugoverse. Based on their selected theme and content, the site is generated and deployed directly to Netlify.

To better support Obsidian, my next step is to extend its functionality by incorporating Obsidian’s double-link Markdown syntax. This will likely require enhancing the Markdown parser or implementing support similar to shortcodes.

As for WYSIWYG editors and OpenStreetMap, I’ll evaluate the need based on specific use cases. While it’s important to acknowledge some limitations, I’m optimistic that focusing on well-defined directions allows us to adapt and improve as needed.

Thanks again for your kind words and feedback—I’m glad this resonates with others, and I look forward to seeing how these ideas evolve!

3 Likes