Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Latest commit

 

History

History
15 lines (10 loc) · 537 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 537 Bytes

Testing Eleventy and GraphQL

A small example of retrieving data from a GraphQL API endpoint and using it to build static pages with Eleventy.

Using Dato CMS in this case.

Install and run

Create a DatoCMS account.

  • copy .env.example and rename as .env
  • add your Dato CMS API Key to your new .env file
  • run npm install
  • run npm run build to delete the cache folder, load data from API and build the site
  • run npm runn dev to spin a dev server and load data from cache (unless you delete the cache file / folder)