This Eleventy starter combines the Google Docs API, Eleventy, and @googleworkspace/google-docs-hast to create pages using Google Docs and Google Drive as a CMS.
- Copy
.env.sampleto.env. - Create a Google Cloud project and enable the Google Docs API.
- Create a service account and download the JSON credentials file.
- Copy the
client_emailandclient_private_keyvalue from the JSON credentials file to the variables in.env. - Create a Google Drive folder and share it with the service account email.
- Copy the folder ID to the
GOOGLE_DRIVE_FOLDERvariable in.env. - Run
npm installto install dependencies. - Run
npm run devto start the development server.