examples icon indicating copy to clipboard operation
examples copied to clipboard

Add example for Hugo

Open rijkvanzanten opened this issue 2 years ago • 2 comments

rijkvanzanten avatar Feb 28 '22 21:02 rijkvanzanten

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/

joselcvarela avatar Jul 23 '22 09:07 joselcvarela

Linear: ENG-101

rijkvanzanten avatar Dec 15 '22 21:12 rijkvanzanten