Using Ghost as a headless CMS with Hugo


I’m currently trying to figure out the best approach to use Ghost as a headless CMS to render a static page via Hugo.

So far I found Data Templates, which allow to pull content from a given URL. The following snippet allows me to render a list of all posts:

    {{ $urlPre := "https://<hostname>" }}
    {{ $urlKey := "/?key=<api-key>" }}
    {{ $json := getJSON $urlPre "/ghost/api/v3/content/posts" $urlKey }}

    {{ range $json.posts | first 10 }}
     <li><a href="{{ .url }}" target="_blank">{{ .title }}</a></li>
    {{ end }}

But what is the best approach to render the actual posts? Is there any chance to “configure” the content of the Hugo Posts? Currently I’m just linking to the Ghost posts, which is not exactly what I intended :wink:

Any hints appreciated!

Kind regards,

It’s coming: :slight_smile:


Thats good news, thank you!
Though I hoped it is already possible - reading about all the “JAM”-Buzz lead me to this assumption^^’