Generate an api to be consumed asynchronously

Hi !

Is it possible to use Hugo to generate an API (sort of) ? By that, I mean to generate a JSON file that I can consume in dynamic client applications (React for exemple).

I this case, I wouldn’t care about themes, css and stuff.

Thanks !

Yes it is, take a look at the custom output formats.

1 Like

I assume there is no way to generate it automatically from the content folder architecture ?

How would that work? Some kind of AI?

Could be parsing recursively (I have absolutely no knowledge in the Hugo way of working, therefore I don’t know what is feasible and what is not)

But regarding your response I guess the response is not :stuck_out_tongue:

Thanks anyway !

Sure. And as @brunoamaral said, this is both possible and very simple. But you have to tell Hugo what you want (some configuration and template). We cannot guess.

Thanks for letting us know! Please read the docs and then ask us specific questions after you know how Hugo works. :slight_smile:

True. Thanks !