sunwei
September 14, 2023, 2:13am
1
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
sunwei
September 15, 2023, 12:54am
2
Checked Hugo live road map , I assume there is no priority for Hugo headless CMS, let’s have a try to build it ourself.
1 Like
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
sunwei
September 20, 2023, 5:43am
4
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