directus-labs / examples

Integration Examples with Directus
https://directus.io/guides
MIT License
254 stars 112 forks source link

Add example for Hugo #67

Open rijkvanzanten opened 2 years ago

joselcvarela commented 2 years ago

I think there's two ways you can do this: 1 - Write a script to fetch all content from Directus you want and write it to files. Then in Hugo you just include those files. 2 - Use included Hugo resource to make requests to Directus. Here's an example how a guy could make it: https://discourse.gohugo.io/t/got-hugo-working-with-directus-headless-cms/39442

In both scenarios you may also want to create a Flow which triggers a new build so your content is always up-to-date: https://docs.directus.io/configuration/flows/

rijkvanzanten commented 1 year ago

Linear: ENG-101